<template>
    <div class="flexbox flexcolumn over_box height_100">
        <BudgetModel />
        <AddBulkBid />
        <AudienceModel />
        <SaveModelName />
        <AddMateri />
        <EditMateri />
        <AddPicture />
        <EditPicture />
        <EditCardInfo />
        <AddMoreWord :keywords="keyWordList" />
        <BatchAddIndustry />
        <IndustryModel />
        <CreatTitleModel />
        <BatchAddCreatTitle :keyWordList="keyWordList" />
        <BatchAddTitle :keyWordFour="keyWordFour" :keyWordList="keyWordList" />
        <div class="adver_box over_box flex">
            <div class="flexbox flexcenter flexbetween plan_header com_box">
                <img src="../../assets/img/step_icon3.svg" alt="">
                <div class="create_cal flexbox flexcenter" v-if="dataForm.createform.type==1">
                    <div class="cal_item">
                        <div class="cal_num">{{dataForm.tableData.length}}</div>
                        <div class="cal_text">抖音号</div>
                    </div>
                    <img src="../../assets/img/sybol_x.svg" alt="" class="sybol_img">
                    <div class="cal_item">
                        <div class="cal_num">{{maxLength}}</div>
                        <div class="cal_text">智能匹配</div>
                    </div>
                    <template v-if="dataForm.market=='VIDEO_PROM_GOODS' || dataForm.createform.creative_way=='VIDEO'">
                        <img src="../../assets/img/sybol_x.svg" alt="" class="sybol_img">
                        <div class="cal_item">
                            <div class="cal_num">{{dataForm.createform.creatinfo_list.length}}</div>
                            <div class="cal_text">创意组</div>
                        </div>
                    </template>
                    <img src="../../assets/img/sybol_e.svg" alt="" class="sybol_img">
                    <div class="cal_item">
                        <div class="cal_num" v-if="dataForm.market=='VIDEO_PROM_GOODS' || dataForm.createform.creative_way=='VIDEO'">{{dataForm.tableData.length*maxLength*dataForm.createform.creatinfo_list.length}}</div>
                        <div class="cal_num" v-else>{{dataForm.tableData.length*maxLength}}</div>
                        <div class="cal_text">计划总数</div>
                    </div>
                </div>
                <div class="create_cal flexbox flexcenter" v-else>
                    <div class="cal_item">
                        <div class="cal_num">{{dataForm.tableData.length}}</div>
                        <div class="cal_text">抖音号</div>
                    </div>
                    <img src="../../assets/img/sybol_x.svg" alt="" class="sybol_img">
                    <div class="cal_item">
                        <div class="cal_num">{{dataForm.createform.budget_list.length}}</div>
                        <div class="cal_text">预算</div>
                    </div>
                    <img src="../../assets/img/sybol_x.svg" alt="" class="sybol_img">
                    <div class="cal_item">
                        <div class="cal_num">{{dataForm.createform.audience_list.length}}</div>
                        <div class="cal_text">定向</div>
                    </div>
                    <template v-if="dataForm.extension=='STANDARD'">
                        <img src="../../assets/img/sybol_x.svg" alt="" class="sybol_img">
                        <div class="cal_item">
                            <div class="cal_num">{{dataForm.createform.industry_list.length}}</div>
                            <div class="cal_text">创意分类</div>
                        </div>
                    </template>
                    <template v-if="dataForm.market=='VIDEO_PROM_GOODS' || dataForm.createform.creative_way=='VIDEO' || dataForm.createform.creative_way.includes('VIDEO')">
                        <img src="../../assets/img/sybol_x.svg" alt="" class="sybol_img">
                        <div class="cal_item">
                            <div class="cal_num">{{dataForm.createform.creatinfo_list.length}}</div>
                            <div class="cal_text">创意组</div>
                        </div>
                    </template>
                    <template v-if="dataForm.createform.creative_material_mode=='PROGRAMMATIC_CREATIVE'">
                        <img src="../../assets/img/sybol_x.svg" alt="" class="sybol_img">
                        <div class="cal_item">
                            <div class="cal_num">{{dataForm.createform.creattitle_list.length}}</div>
                            <div class="cal_text">标题组</div>
                        </div>
                    </template>
                    <img src="../../assets/img/sybol_e.svg" alt="" class="sybol_img">
                    <div class="cal_item">
                        <!-- <div class="cal_num" v-if="dataForm.market=='VIDEO_PROM_GOODS' || dataForm.createform.creative_way=='VIDEO'">
                            <template v-if="dataForm.createform.creative_material_mode=='CUSTOM_CREATIVE'">
                                {{dataForm.tableData.length*dataForm.createform.budget_list.length*dataForm.createform.audience_list.length*dataForm.createform.industry_list.length*dataForm.createform.creatinfo_list.length}}
                            </template>
                            <template v-else-if="dataForm.createform.creative_material_mode=='PROGRAMMATIC_CREATIVE'">
                                {{dataForm.tableData.length*dataForm.createform.budget_list.length*dataForm.createform.audience_list.length*dataForm.createform.industry_list.length*dataForm.createform.creatinfo_list.length*dataForm.createform.creattitle_list.length}}
                            </template>
                        </div>
                        <div class="cal_num" v-else>{{dataForm.tableData.length*dataForm.createform.budget_list.length*dataForm.createform.audience_list.length*dataForm.createform.industry_list.length}}</div> -->
                        <div class="cal_num">{{allLength}}</div>
                        <div class="cal_text">计划总数</div>
                    </div>
                </div>
            </div>
            <el-form ref="createform" :model="createform" :rules="createRules" label-position="top" class="create_form" :hide-required-asterisk='true'>
                <!-- 投放设置 -->
                <div class="com_box pd_20 no_radius" style="display:block">
                    <div class="reset_title flexbox flexcenter flexbetween">
                        <div class="flexbox flexcenter">
                            <div class="reset_text">营销目标：
                                <span v-if="dataForm.market == 'VIDEO_PROM_GOODS'">短视频/图文带货</span>
                                <span v-if="dataForm.market == 'LIVE_PROM_GOODS'">直播带货</span>
                            </div>
                            <div class="reset_text">推广方式：
                                <span v-if="dataForm.extension=='STANDARD'">专业推广</span>
                                <span v-else>极速推广</span>
                            </div>
                        </div>
                        <span class="icon_btn flexbox flexcenter flexjust" @click="toStepOne">
                            <img src="../../assets/img/edit_icon3.svg" alt="">
                        </span>
                    </div>
                    <template  v-if="dataForm.market=='LIVE_PROM_GOODS' && dataForm.extension=='SIMPLE'">
                        <div class="market_title">托管设置</div>
                        <el-form-item label="成本稳投" prop="lab_ad_type" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}">
                            <div class="flexbox flexcenter">
                                <el-radio-group v-model="createform.lab_ad_type" size="small" @change="managedSet2">
                                    <el-radio-button label="LAB_AD">开启</el-radio-button>
                                    <el-radio-button label="NOT_LAB_AD">关闭</el-radio-button>
                                </el-radio-group>
                                <span class="user_tips font_12 color_02" v-if="createform.lab_ad_type=='LAB_AD'">Tips：开启计划托管后，已选择的广告组将会失效</span>
                            </div> 
                        </el-form-item>
                    </template>
                    <template  v-if="dataForm.market=='VIDEO_PROM_GOODS' && dataForm.extension=='STANDARD'">
                        <div class="market_title">托管设置</div>
                        <el-form-item label="计划托管" prop="lab_ad_type" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}">
                            <div class="flexbox flexcenter">
                                <el-radio-group v-model="createform.lab_ad_type" size="small" @change="managedSet">
                                    <el-radio-button label="LAB_AD">开启</el-radio-button>
                                    <el-radio-button label="NOT_LAB_AD">关闭</el-radio-button>
                                </el-radio-group>
                                <span class="user_tips font_12 color_02" v-if="createform.lab_ad_type=='LAB_AD'">Tips：开启计划托管后，已选择的广告组将会失效</span>
                            </div> 
                        </el-form-item>
                        <el-form-item label="超成本自动暂停" prop="enable_auto_pause" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}" v-if="createform.lab_ad_type=='LAB_AD'">
                            <el-radio-group v-model="createform.enable_auto_pause" size="small" @change="sessionSave">
                                <el-radio-button :label="1">开启</el-radio-button>
                                <el-radio-button :label="0">关闭</el-radio-button>
                            </el-radio-group>
                        </el-form-item>
                    </template>
                    <div class="market_title">投放设置</div>
                    <el-form-item label="转化目标" prop="external_action" :rules="{required: true, message: '请选择转化目标', trigger: ['blur', 'change']}" style="margin-bottom:0">
                        <el-radio-group v-model="createform.external_action" @change="changeExternal" class="create_radio" style="width:834px">
                            <template v-if="dataForm.market=='VIDEO_PROM_GOODS'">
                                <el-radio label="AD_CONVERT_TYPE_SHOPPING">
                                    <div class="flexbox flexcenter conversion_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <img src="../../assets/img/conversion_icon1.svg" alt="" class="conversion_img">
                                        <div class="conversion_info">
                                            <div class="conversion_name">商品购买</div>
                                            <div class="conversion_text">更多人购买商品</div>
                                        </div>
                                    </div>
                                </el-radio>
                                <el-radio label="AD_CONVERT_TYPE_QC_FOLLOW_ACTION" :disabled="createform.lab_ad_type=='LAB_AD'">
                                    <div class="flexbox flexcenter conversion_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <img src="../../assets/img/conversion_icon2.svg" alt="" class="conversion_img">
                                        <div class="conversion_info">
                                            <div class="conversion_name">粉丝提升</div>
                                            <div class="conversion_text">更多人关注抖音号</div>
                                        </div>
                                    </div>
                                </el-radio>
                                <el-radio label="AD_CONVERT_TYPE_QC_MUST_BUY" :disabled="createform.lab_ad_type=='LAB_AD'">
                                    <div class="flexbox flexcenter conversion_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <img src="../../assets/img/conversion_icon3.svg" alt="" class="conversion_img">
                                        <div class="conversion_info">
                                            <div class="conversion_name">点赞评论</div>
                                            <div class="conversion_text">更多人点赞或评论</div>
                                        </div>
                                    </div>
                                </el-radio>
                            </template>
                            <template v-else-if="dataForm.market=='LIVE_PROM_GOODS'">
                                <el-radio label="AD_CONVERT_TYPE_LIVE_ENTER_ACTION" :disabled="createform.lab_ad_type=='LAB_AD'">
                                    <div class="flexbox flexcenter conversion_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <img src="../../assets/img/conversion_icon4.svg" alt="" class="conversion_img">
                                        <div class="conversion_info">
                                            <div class="conversion_name">进入直播间</div>
                                            <div class="conversion_text">更多人进入直播间</div>
                                        </div>
                                    </div>
                                </el-radio>
                                <el-radio label="AD_CONVERT_TYPE_LIVE_CLICK_PRODUCT_ACTION" :disabled="createform.lab_ad_type=='LAB_AD'">
                                    <div class="flexbox flexcenter conversion_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <img src="../../assets/img/conversion_icon5.svg" alt="" class="conversion_img">
                                        <div class="conversion_info">
                                            <div class="conversion_name">直播间商品点击</div>
                                            <div class="conversion_text">更多人点击商品</div>
                                        </div>
                                    </div>
                                </el-radio>
                                <el-radio label="AD_CONVERT_TYPE_LIVE_SUCCESSORDER_ACTION" :disabled="createform.lab_ad_type=='LAB_AD'">
                                    <div class="flexbox flexcenter conversion_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <img src="../../assets/img/conversion_icon6.svg" alt="" class="conversion_img">
                                        <div class="conversion_info">
                                            <div class="conversion_name">直播间下单</div>
                                            <div class="conversion_text">更多人下单商品</div>
                                        </div>
                                    </div>
                                </el-radio>
                                <el-radio label="AD_CONVERT_TYPE_LIVE_SUCCESSORDER_PAY">
                                    <div class="flexbox flexcenter conversion_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <img src="../../assets/img/conversion_icon7.svg" alt="" class="conversion_img">
                                        <div class="conversion_info">
                                            <div class="conversion_name">直播间成交</div>
                                            <div class="conversion_text">更多人支付订单</div>
                                        </div>
                                    </div>
                                </el-radio>
                                <el-radio label="AD_CONVERT_TYPE_NEW_FOLLOW_ACTION" :disabled="createform.lab_ad_type=='LAB_AD'">
                                    <div class="flexbox flexcenter conversion_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <img src="../../assets/img/conversion_icon8.svg" alt="" class="conversion_img">
                                        <div class="conversion_info">
                                            <div class="conversion_name">直播间粉丝提升</div>
                                            <div class="conversion_text">更多人关注抖音号</div>
                                        </div>
                                    </div>
                                </el-radio>
                                <el-radio label="AD_CONVERT_TYPE_LIVE_COMMENT_ACTION" :disabled="createform.lab_ad_type=='LAB_AD'">
                                    <div class="flexbox flexcenter conversion_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <img src="../../assets/img/conversion_icon9.svg" alt="" class="conversion_img">
                                        <div class="conversion_info">
                                            <div class="conversion_name">直播间评论</div>
                                            <div class="conversion_text">更多人在直播间评论</div>
                                        </div>
                                    </div>
                                </el-radio>
                            </template>
                        </el-radio-group>
                    </el-form-item>
                    <template v-if="dataForm.extension=='STANDARD'">
                        <el-form-item v-if="createform.external_action == 'AD_CONVERT_TYPE_LIVE_ENTER_ACTION' ||  createform.external_action == 'AD_CONVERT_TYPE_LIVE_CLICK_PRODUCT_ACTION'" style="margin-bottom:0">
                            <el-checkbox v-model="createform.deep_external_action" :disabled="createform.delivery.cost_control" true-label="AD_CONVERT_TYPE_LIVE_SUCCESSORDER_ACTION" false-label="" @change="sessionSave">期望同时优化「直播间下单」</el-checkbox>
                        </el-form-item>
                    </template>
                    <template v-if="!(dataForm.market=='VIDEO_PROM_GOODS' && dataForm.extension=='SIMPLE')">
                        <div class="flexbox flexcenter" v-if="createform.external_action == 'AD_CONVERT_TYPE_LIVE_SUCCESSORDER_PAY' || createform.external_action == 'AD_CONVERT_TYPE_SHOPPING'">
                            <el-form-item style="margin-bottom:0">
                                <el-checkbox v-model="createform.deep_external_action" :disabled="createform.delivery.cost_control || createform.delivery.smart_bid_type=='SMART_BID_CONSERVATIVE' || (createform.lab_ad_type=='LAB_AD' && dataForm.market=='VIDEO_PROM_GOODS')" true-label="AD_CONVERT_TYPE_LIVE_PAY_ROI" false-label="" @change="payRoi">支付ROI</el-checkbox>
                            </el-form-item>
                            <template v-if="createform.deep_external_action=='AD_CONVERT_TYPE_LIVE_PAY_ROI'">
                                <el-form-item style="margin-bottom:0;margin-left:10px" prop="deep_bid_type" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}">
                                    <el-checkbox v-model="createform.deep_bid_type" true-label="MIN" disabled false-label="" @change="sessionSave">深度出价方式</el-checkbox>
                                </el-form-item>
                                <span class="font_14 color_01" style="margin-left:10px;margin-right:5px">支付ROI目标</span>
                                <el-form-item style="margin-bottom:0" prop="roi_goal" :rules="createRules.checkRoi">
                                    <el-input placeholder="最多支持两位小数，0.01～100" style="width:215px" @change="sessionSave" v-model="createform.roi_goal" size="small">
                                    </el-input>
                                </el-form-item>
                                <span class="user_tips font_12 color_02">Tips：请自行确认账号是否拥有此功能</span>
                            </template>
                        </div>
                    </template>
                </div>

                <!-- 预算和出价 -->
                <div class="com_box pd_20 mt_12" style="display:block">
                    <div class="market_title">预算和出价</div>
                    <el-form-item label="" prop="title">
                        <div class="flexbox flexcenter">
                            <el-popover placement="bottom" width="460" trigger="click">
                                <div class="yusuan_num">预算出价：{{createform.budget_list.length}} /10</div>
                                <div class="yusuan_list">
                                    <div class="yusuan_item flexbox flexcenter flexbetween" @click="seletBudget(item,index)" :class="{'active':index==createform.budget_active}" v-for="(item,index) in createform.budget_list" :key="index">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="ys_check">
                                        <el-input v-model="item.model_name" placeholder="请输入内容" size="small" class="ys_input" @input="changePlanKey(3,item.model_name)"></el-input>
                                        <div class="yusuan_edit flexbox flexcenter">
                                            <el-tooltip content="存为模板" placement="top">
                                                <span class="icon_btn" @click.stop="saveModel(item,index,1)"><img src="../../assets/img/ys_icon1.svg" alt=""></span>
                                            </el-tooltip>
                                            <el-tooltip content="删除" placement="top">
                                                <span class="icon_btn" @click.stop="deletBudget(index)"><img src="../../assets/img/ys_icon2.svg" alt=""></span>
                                            </el-tooltip>
                                        </div>
                                    </div>
                                </div>
                                <div class="yusuan_btn flexbox flexbetween">
                                    <el-button size="mini" style="width:222px" @click="addBudget">添加预算出价</el-button>
                                    <el-button size="mini" style="width:222px" @click="budgetModel">选择模板</el-button>
                                </div>
                                <div slot="reference" class="select_box flexbox flexcenter flexbetween">
                                    <span class="select_text">{{createform.delivery.model_name}}</span>
                                    <span class="el-icon-caret-bottom"></span>
                                </div>
                            </el-popover>
                            <div class="yusuan_num" style="font-size:14px;margin-left:16px">预算出价：{{createform.budget_list.length}} /10</div>
                        </div>
                    </el-form-item>
                    <el-form-item label="投放方式" :prop="`delivery.smart_bid_type`" style="margin-bottom:0">
                        <div class="flexbox flexcenter">
                            <el-radio-group v-model="createform.delivery.smart_bid_type" class="create_radio" @change="changeSmartType">
                                <el-radio label="SMART_BID_CUSTOM">
                                    <div class="flexbox flexjust flexcolumn launch_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <div class="launch_name">控制成本投放</div>
                                        <div class="launch_text">控制成本，尽量消耗预算</div>
                                    </div>
                                </el-radio>
                                <el-radio label="SMART_BID_CONSERVATIVE" :disabled="createform.lab_ad_type=='LAB_AD'">
                                    <div class="flexbox flexjust flexcolumn launch_type">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">
                                        <div class="launch_name">放量投放</div>
                                        <div class="launch_text">尽量消耗更多预算，接受成本上浮</div>
                                    </div>
                                </el-radio>
                            </el-radio-group>
                        </div>
                    </el-form-item>
                    <template v-if="createform.delivery.smart_bid_type=='SMART_BID_CUSTOM' && dataForm.extension=='STANDARD'">
                        <el-form-item :prop="`delivery.cost_control`" v-if="createform.delivery.smart_bid_type=='SMART_BID_CUSTOM' && createform.lab_ad_type=='NOT_LAB_AD'">
                            <el-checkbox v-model="createform.delivery.cost_control" @change="changeCostControl">严格控制成本上限</el-checkbox>
                        </el-form-item>
                        <el-form-item label="投放速度" :prop="`delivery.flow_control_mode`" v-if="!createform.delivery.cost_control">
                            <el-radio-group v-model="createform.delivery.flow_control_mode" size="small" @change="sessionSave">
                                <el-radio-button label="FLOW_CONTROL_MODE_FAST">尽快投放</el-radio-button>
                                <el-radio-button label="FLOW_CONTROL_MODE_BALANCE" :disabled="createform.lab_ad_type=='LAB_AD'">均匀投放</el-radio-button>
                            </el-radio-group>
                        </el-form-item>
                    </template>
                    <template  v-if="dataForm.market=='VIDEO_PROM_GOODS' && dataForm.extension=='STANDARD'">
                        <el-form-item label="托管策略" prop="auto_manage_strategy_cmd" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}" v-if="createform.lab_ad_type=='LAB_AD'">
                            <el-radio-group v-model="createform.auto_manage_strategy_cmd" size="small" @change="sessionSave">
                                <el-radio-button :label="0">优先跑量</el-radio-button>
                                <el-radio-button :label="1">优先成本</el-radio-button>
                            </el-radio-group>
                        </el-form-item>
                    </template>
                    <template v-if="dataForm.market=='VIDEO_PROM_GOODS'">
                        <template v-if="dataForm.extension=='STANDARD'">
                            <el-form-item label="预算" :prop="`delivery.budget`" v-if="createform.delivery.smart_bid_type=='SMART_BID_CUSTOM'" key="SMART_BID_CUSTOM">
                                <el-input placeholder="请输入金额" style="width:246px" @change="sessionSave" v-model="createform.delivery.budget" class="input-with-select" size="small">
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px">元</span>
                                    <el-select v-model="createform.delivery.budget_mode" slot="prepend" placeholder="请选择" class="ys_select" @change="changeBudgetMode">
                                        <el-option label="日预算" value="BUDGET_MODE_DAY"></el-option>
                                        <el-option label="总预算" value="BUDGET_MODE_TOTAL" :disabled="createform.lab_ad_type=='LAB_AD'"></el-option>
                                    </el-select>
                                </el-input>
                            </el-form-item>
                            <el-form-item label="日预算" :prop="`delivery.budget`" v-else-if="createform.delivery.smart_bid_type=='SMART_BID_CONSERVATIVE'" key="SMART_BID_CONSERVATIVE">
                                <el-input placeholder="请输入金额" style="width:130px" @change="sessionSave" v-model="createform.delivery.budget" size="small">
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px">元</span>
                                </el-input>
                            </el-form-item>
                        </template>
                        <template v-else>
                            <el-form-item label="日预算" :prop="`delivery.budget`" key="SMART_BID_CONSERVATIVE">
                                <el-input placeholder="请输入金额" style="width:130px" @change="sessionSave" v-model="createform.delivery.budget" size="small">
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px">元</span>
                                </el-input>
                            </el-form-item>
                        </template>
                        <el-form-item label="出价方式" prop="title" v-if="createform.delivery.smart_bid_type=='SMART_BID_CUSTOM' && dataForm.extension=='STANDARD'">
                            <div class="offer_type">
                                <div class="offer_name">按展示付费(oCPM)</div>
                                <div class="offer_text flexbox flexcenter">首次投放后三个自然日内系统提供“ <img src="../../assets/img/offer_icon.svg" alt="">超成本赔付”保障，可放心新建计划并投放。详见<el-link type="primary" href="https://bytedance.feishu.cn/docs/doccnZOePfoTKhc4mLZ6rPGIfCe" target="_blank">oCPM赔付规则</el-link>
                                </div>
                            </div>
                        </el-form-item>
                        <el-form-item label="出价" :prop="`delivery.cpa_bid`" v-if="createform.delivery.smart_bid_type=='SMART_BID_CUSTOM'">
                            <div class="flexbox flexcenter">
                                <el-input placeholder="" v-model="createform.delivery.cpa_bid" @change="sessionSave" size="small" style="width:143px">
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-if="createform.external_action=='AD_CONVERT_TYPE_SHOPPING'">元/下单</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_QC_FOLLOW_ACTION'">元/关注</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_QC_MUST_BUY'">元/点击</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_LIVE_ENTER_ACTION'">元/观看</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_LIVE_CLICK_PRODUCT_ACTION'">元/点击</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_LIVE_SUCCESSORDER_ACTION'">元/下单</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_LIVE_SUCCESSORDER_PAY'">元/成交</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_NEW_FOLLOW_ACTION'">元/关注</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_LIVE_COMMENT_ACTION'">元/评论</span>
                                </el-input>
                                <el-link type="primary" :underline="false" style="margin-left:12px" @click="addBulkBid">
                                    <div class="flexbox flexcenter">
                                        <img src="../../assets/img/offer_add.svg" alt="" style="margin-right:5px">
                                        批量出价
                                    </div>
                                </el-link>
                            </div>
                        </el-form-item>
                    </template>
                    <template v-if="dataForm.extension=='STANDARD' || dataForm.market=='VIDEO_PROM_GOODS'">
                        <el-form-item label="投放日期" prop="title">
                            <div class="flexbox flexcenter">
                                <el-radio-group v-model="createform.delivery.video_schedule_type" size="small" @change="sessionSave">
                                    <el-radio-button label="SCHEDULE_FROM_NOW" :disabled="createform.delivery.budget_mode=='BUDGET_MODE_TOTAL'">从今天起长期投放</el-radio-button>
                                    <el-radio-button label="SCHEDULE_START_END">设置开始和结束日期</el-radio-button>
                                    <el-radio-button label="SCHEDULE_TIME_FIXEDRANGE" v-if="dataForm.market=='LIVE_PROM_GOODS'">固定时长</el-radio-button>
                                </el-radio-group>
                            </div>
                        </el-form-item>
                        <el-form-item label="投放日期范围" :prop="`delivery.delivery_time`" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}" v-if="createform.delivery.video_schedule_type=='SCHEDULE_START_END'">
                            <el-date-picker v-model="createform.delivery.delivery_time" @change="selectSeliverytime" type="daterange" range-separator="~" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" size="small" :picker-options="pickerOptions">
                            </el-date-picker>
                        </el-form-item>
                        <el-form-item label="投放时长" prop="title" v-if="createform.delivery.video_schedule_type=='SCHEDULE_TIME_FIXEDRANGE'">
                            <el-input-number @change="sessionSave" v-model="createform.delivery.schedule_fixed_range" size="small" :step="0.5" :min="0.5" :max="24" label="描述文字"></el-input-number>
                        </el-form-item>
                        <el-form-item label="投放时段" prop="title" style="overflow:hidden" v-if="createform.delivery.video_schedule_type !='SCHEDULE_TIME_FIXEDRANGE'">
                            <el-radio-group v-model="createform.delivery.launch_period" size="small" @change="sessionSave">
                                <el-radio-button label="1">不限</el-radio-button>
                                <el-radio-button label="2">指定时间段</el-radio-button>
                            </el-radio-group>
                        </el-form-item>
                    </template>
                    <template  v-if="dataForm.extension=='SIMPLE' && dataForm.market=='LIVE_PROM_GOODS'">
                        <template v-if="createform.lab_ad_type=='LAB_AD'">
                            <el-form-item label="投放日期" prop="title">
                                <div class="flexbox flexcenter">
                                    <el-radio-group v-model="createform.delivery.video_schedule_type" size="small" @change="sessionSave">
                                        <el-radio-button label="SCHEDULE_FROM_NOW" :disabled="createform.delivery.budget_mode=='BUDGET_MODE_TOTAL'">从今天起长期投放</el-radio-button>
                                        <el-radio-button label="SCHEDULE_START_END">设置开始和结束日期</el-radio-button>
                                    </el-radio-group>
                                </div>
                            </el-form-item>
                            <el-form-item label="投放日期范围" :prop="`delivery.delivery_time`" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}" v-if="createform.delivery.video_schedule_type=='SCHEDULE_START_END'">
                                <el-date-picker v-model="createform.delivery.delivery_time" @change="selectSeliverytime" type="daterange" range-separator="~" value-format="yyyy-MM-dd" start-placeholder="开始日期" end-placeholder="结束日期" size="small" :picker-options="pickerOptions">
                                </el-date-picker>
                            </el-form-item>
                        </template>
                        <el-form-item label="投放时长" prop="title" v-else>
                            <el-input-number @change="sessionSave" v-model="createform.delivery.schedule_fixed_range" size="small" :step="0.5" :min="0.5" :max="24" label="描述文字"></el-input-number>
                        </el-form-item>
                    </template>
                    <TimeSlot v-if="createform.delivery.launch_period==2" v-model="createform.delivery.schedule_time_value" @change="sessionSave" />
                    <!-- <TimeModel v-if="createform.delivery.launch_period==2" :createform='createform' :sessionSave="sessionSave" /> -->
                    <template v-if="dataForm.market=='LIVE_PROM_GOODS'">
                        <el-form-item :label="(createform.delivery.video_schedule_type=='SCHEDULE_TIME_FIXEDRANGE'||dataForm.extension=='SIMPLE')?'总预算':'日预算'" :prop="`delivery.budget`">
                            <el-input placeholder="请输入金额" style="width:130px" @change="sessionSave" v-model="createform.delivery.budget" size="small">
                                <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px">元</span>
                            </el-input>
                        </el-form-item>
                        <el-form-item label="出价" :prop="`delivery.cpa_bid`" v-if="createform.delivery.smart_bid_type=='SMART_BID_CUSTOM'">
                            <div class="flexbox flexcenter">
                                <el-input placeholder="" @change="sessionSave" v-model="createform.delivery.cpa_bid" size="small" style="width:143px">
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-if="createform.external_action=='AD_CONVERT_TYPE_SHOPPING'">元/下单</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_QC_FOLLOW_ACTION'">元/关注</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_QC_MUST_BUY'">元/点击</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_LIVE_ENTER_ACTION'">元/观看</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_LIVE_CLICK_PRODUCT_ACTION'">元/点击</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_LIVE_SUCCESSORDER_ACTION'">元/下单</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_LIVE_SUCCESSORDER_PAY'">元/成交</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_NEW_FOLLOW_ACTION'">元/关注</span>
                                    <span slot="suffix" style="line-height:32px;color:#17233D;margin-right:5px" v-else-if="createform.external_action=='AD_CONVERT_TYPE_LIVE_COMMENT_ACTION'">元/评论</span>
                                </el-input>
                                <el-link type="primary" :underline="false" style="margin-left:12px" @click="addBulkBid">
                                    <div class="flexbox flexcenter">
                                        <img src="../../assets/img/offer_add.svg" alt="" style="margin-right:5px">
                                        批量出价
                                    </div>
                                </el-link>
                            </div>
                        </el-form-item>
                    </template>
                </div>

                <!-- 定向人群 -->
                <div class="com_box pd_20 mt_12" style="display:block">
                    <div class="market_title">定向人群</div>
                    <el-form-item label="" prop="title">
                        <div class="flexbox flexcenter">
                            <el-popover placement="bottom" width="460" trigger="click">
                                <div class="yusuan_num">定向人群：{{createform.audience_list.length}} /10</div>
                                <div class="yusuan_list">
                                    <div class="yusuan_item flexbox flexcenter flexbetween" @click="seletAudience(item,index)" :class="{'active':index==createform.audience_active}" v-for="(item,index) in createform.audience_list" :key="index">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="ys_check">
                                        <el-input v-model="item.model_name" placeholder="请输入内容" size="small" class="ys_input" @input="changePlanKey(4,item.model_name)"></el-input>
                                        <div class="yusuan_edit flexbox flexcenter">
                                            <el-tooltip content="存为模板" placement="top">
                                                <span class="icon_btn" @click.stop="saveModel(item,index,2)"><img src="../../assets/img/ys_icon1.svg" alt=""></span>
                                            </el-tooltip>
                                            <el-tooltip content="删除" placement="top">
                                                <span class="icon_btn" @click.stop="deletAudience(index)"><img src="../../assets/img/ys_icon2.svg" alt=""></span>
                                            </el-tooltip>
                                        </div>
                                    </div>
                                </div>
                                <div class="yusuan_btn flexbox flexbetween">
                                    <el-button size="mini" style="width:222px" @click="addAudience">添加定向人群</el-button>
                                    <el-button size="mini" style="width:222px" @click="audienceModel">选择模板</el-button>
                                </div>
                                <div slot="reference" class="select_box flexbox flexcenter flexbetween">
                                    <span class="select_text">{{createform.audience.model_name}}</span>
                                    <span class="el-icon-caret-bottom"></span>
                                </div>
                            </el-popover>
                            <div class="yusuan_num" style="font-size:14px;margin-left:16px">定向人群：{{createform.audience_list.length}} /10</div>
                        </div>
                    </el-form-item>
                    <el-form-item label="定向人群" prop="audience" v-if="dataForm.extension=='SIMPLE'">
                        <el-radio-group v-model="createform.audience.audience_mode" @change="sessionSave" size="small">
                            <el-radio-button label="AUTO">智能推荐</el-radio-button>
                            <el-radio-button label="CUSTOM">自定义人群</el-radio-button>
                        </el-radio-group>
                    </el-form-item>
                    <template v-if="dataForm.extension=='STANDARD' || createform.audience.audience_mode=='CUSTOM'">
                        <el-form-item label="地域" prop="title">
                            <el-radio-group v-model="createform.audience.district" size="small" @change="changeCity">
                                <el-radio-button label="NONE">不限</el-radio-button>
                                <el-radio-button label="CITY">按省市</el-radio-button>
                                <el-radio-button label="COUNTY">按区县</el-radio-button>
                            </el-radio-group>
                            <el-form-item label="" v-if="createform.audience.district=='CITY'" key="CITY" :prop="`audience.cityVal`">
                                <div class="cascader_box">
                                    <div class="flexbox flexbetween">
                                        <div class="cascader_left">
                                            <div class="cas_header flexbox flexcenter flexbetween">按省市 <el-checkbox v-model="createform.audience.isAllCity" @change="cityAllCheck">全选</el-checkbox>
                                            </div>
                                            <div class="cas_center over_box flexbox">
                                                <el-cascader-panel ref="citys" v-model="createform.audience.cityVal" :options="cityOptions" :props="{multiple:true,label:'label',value:'value',}" @change="getCityVal"></el-cascader-panel>
                                            </div>
                                        </div>
                                        <div class="cascader_right flexbox flexcolumn">
                                            <div class="cas_header flexbox flexcenter flexbetween">
                                                <span>已选</span>
                                                <el-link type="primary" :underline="false" @click="clearCitySNode('citys')">清空</el-link>
                                            </div>
                                            <div class="has_ckecked_box over_box">
                                                <div class="has_checked_item flexbox flexcenter flexbetween" v-for="(item,index) in createform.audience.cityHasCheck" :key="index">
                                                    <span class="has_checked_text">{{item.label}}</span>
                                                    <el-link class="has_checked_icon" icon='el-icon-close' :underline="false" @click="deletCity(item,index)"></el-link>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <el-radio-group @change="selectRegion" v-model="createform.audience.location_type" class="region_radio">
                                        <el-radio label="CURRENT">正在该地区的用户</el-radio>
                                        <el-radio label="HOME">居住在该地区的用户</el-radio>
                                        <el-radio label="TRAVEL">到该地区旅行的用户</el-radio>
                                        <el-radio label="ALL">该地区内的所有用户</el-radio>
                                    </el-radio-group>
                                </div>
                            </el-form-item>
                            <el-form-item label="" v-else-if="createform.audience.district=='COUNTY'" key="COUNTY" :prop="`audience.cityVal`">
                                <div class="cascader_box">
                                    <div class="flexbox flexbetween">
                                        <div class="cascader_left">
                                            <div class="cas_header flexbox flexcenter flexbetween">按区县 <el-checkbox v-model="createform.audience.isAllCity" @change="cityAllCheck">全选</el-checkbox>
                                            </div>
                                            <div class="cas_center over_box flexbox">
                                                <el-cascader-panel ref="citys" v-model="createform.audience.cityVal" :options="countyOptions" :props="{multiple:true,label:'label',value:'value',}" @change="getCityVal"></el-cascader-panel>
                                            </div>
                                        </div>
                                        <div class="cascader_right flexbox flexcolumn">
                                            <div class="cas_header flexbox flexcenter flexbetween">
                                                <span>已选{{createform.audience.cityHasCheck.length}}</span>
                                                <el-link type="primary" :underline="false" @click="clearCitySNode('citys')">清空</el-link>
                                            </div>
                                            <div class="has_ckecked_box over_box">
                                                <div class="has_checked_item flexbox flexcenter flexbetween" v-for="(item,index) in createform.audience.cityHasCheck" :key="index">
                                                    <span class="has_checked_text">{{item.label}}</span>
                                                    <el-link class="has_checked_icon" icon='el-icon-close' :underline="false" @click="deletCity(item,index)"></el-link>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <el-radio-group v-model="createform.audience.location_type" @change="selectRegion" class="region_radio">
                                        <el-radio label="CURRENT">正在该地区的用户</el-radio>
                                        <el-radio label="HOME">居住在该地区的用户</el-radio>
                                        <el-radio label="TRAVEL">到该地区旅行的用户</el-radio>
                                        <el-radio label="ALL">该地区内的所有用户</el-radio>
                                    </el-radio-group>
                                </div>
                            </el-form-item>
                            <div style="margin-top:10px" class="flexbox flexcenter" v-if="createform.audience.location_type=='CURRENT'">
                                <el-checkbox v-model="createform.audience.exclude_limited_region" :true-label="1" :false-label="0" @change="sessionSave">排除限运地区</el-checkbox>
                                <span class="user_tips font_12 color_02">注意：如果同时勾选“智能放量-地域”，将探索含限运地区的目标人群</span>
                            </div>
                        </el-form-item>
                        <el-form-item label="新客定向" :prop="`audience.new_customer`" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}" v-if="dataForm.extension=='STANDARD'">
                            <el-radio-group v-model="createform.audience.new_customer" @change="sessionSave" size="small">
                                <el-radio-button label="NONE">不限</el-radio-button>
                                <el-radio-button label="NO_BUY">店铺未购</el-radio-button>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="性别" prop="audience">
                            <el-radio-group v-model="createform.audience.gender" @change="sessionSave" size="small">
                                <el-radio-button label="NONE">不限</el-radio-button>
                                <el-radio-button label="GENDER_FEMALE">女</el-radio-button>
                                <el-radio-button label="GENDER_MALE">男</el-radio-button>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="年龄" prop="title">
                            <div class="flexbox flexcenter checked_list">
                                <el-radio label="1" v-model="createform.audience.age_null" @change="changeAgeNull">
                                    <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">不限</div>
                                </el-radio>
                                <el-checkbox-group v-model="createform.audience.age" @change="changeAgeHas">
                                    <el-checkbox label="AGE_BETWEEN_18_23">
                                        <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">18-23</div>
                                    </el-checkbox>
                                    <el-checkbox label="AGE_BETWEEN_24_30">
                                        <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">24-30</div>
                                    </el-checkbox>
                                    <el-checkbox label="AGE_BETWEEN_31_40">
                                        <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">31-40</div>
                                    </el-checkbox>
                                    <el-checkbox label="AGE_BETWEEN_41_49">
                                        <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">41-49</div>
                                    </el-checkbox>
                                    <el-checkbox label="AGE_ABOVE_50">
                                        <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">50+</div>
                                    </el-checkbox>
                                </el-checkbox-group>
                            </div>
                        </el-form-item>
                        <el-form-item label="抖音达人" prop="title" v-if="createform.lab_ad_type!='LAB_AD'">
                            <el-radio-group v-model="createform.audience.awemeRadio" size="small" @change="changeAudience">
                                <el-radio-button label="1">不限</el-radio-button>
                                <el-radio-button label="2">自定义</el-radio-button>
                            </el-radio-group>
                            <el-form-item label="" :prop="`audience.tiktokAllCheck`" v-if="createform.audience.awemeRadio==2" key="tiktokAllCheck">
                                <div class="cascader_box">
                                    <div class="flexbox flexcenter">
                                        定向与以下达人产生
                                        <el-select multiple collapse-tags v-model="createform.audience.aweme_fan_behaviors" placeholder="" size="small" style="margin:0 12px;width:208px" @change="changeAwemeFan">
                                            <el-option :label="item.name" :value="item.id" v-for="(item,index) in behaviorsList" :key="index"></el-option>
                                        </el-select>
                                        互动的用户，时间范围取
                                        <el-select @change="sessionSave" v-model="createform.audience.aweme_fan_behaviors_days" placeholder="" size="small" style="margin:0 12px;width:100px">
                                            <el-option :label="item.name" :value="item.id" v-for="(item,index) in behaviorsDays" :key="index"></el-option>
                                        </el-select>
                                    </div>
                                    <div style="margin-top:15px" class="flexbox flexcenter">
                                        <span class="font_14 color_01">达人分类搜索：</span>
                                        <el-cascader v-model="createform.audience.tiktokTypeVal" ref="tiktokType" filterable size="small" class="flex" collapse-tags :options="createform.audience.tiktokTypeOption" :props="{multiple:true,label:'value',value:'id'}" @change="tiktokTypeCheck" style="width:330px">
                                        </el-cascader>
                                    </div>
                                    <div style="margin-top:15px" class="flexbox flexcenter">
                                        <span class="font_14 color_01">抖音达人搜索：</span>
                                        <el-input placeholder="支持搜索达人、抖音昵称" @change="remoteMethodTitok" clearable class="flex" size="small" prefix-icon="el-icon-search" v-model="createform.audience.titokQuery">
                                        </el-input>
                                    </div>
                                    <div class="flexbox flexbetween" style="margin-top:16px">
                                        <div class="cascader_left">
                                            <div class="cas_header2 flexbox flexcenter">
                                                <el-tabs v-model="createform.audience.recomentRadio" @tab-click="handleClick" class="tab_style">
                                                    <el-tab-pane label="添加达人分类" name="CLASS"></el-tab-pane>
                                                    <el-tab-pane label="添加抖音达人" name="TITKOT"></el-tab-pane>
                                                </el-tabs>
                                            </div>
                                            <div v-if="createform.audience.recomentRadio=='CLASS'" key="CLASS">
                                                <div class="cas_header flexbox flexcenter">
                                                    达人分类
                                                </div>
                                                <div class="cas_center over_box flexbox" v-loading="titok_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                    <el-cascader-panel class="tiktok_cascader" ref="tiktokType" :key="titokResh" v-model="createform.audience.tiktokTypeVal" :options="createform.audience.tiktokTypeOption" :props="{multiple:true,label:'value',value:'id'}" @change="tiktokTypeCheck">
                                                        <template slot-scope="{ node, data }">
                                                            <div @click="getTiktokData(node)">
                                                                <div class="font_14 color_01">{{data.value}}</div>
                                                                <div class="font_13 color_02" style="margin-top:5px">粉丝数量{{data.fans_num_str}}</div>
                                                            </div>
                                                        </template>
                                                    </el-cascader-panel>
                                                </div>
                                                <div class="tiktok_text">
                                                    <el-link :underline="false" type="primary" @click="getRecomendList" v-if="createform.audience.category_id">查看{{createform.audience.category_text}}推荐抖音达人</el-link>
                                                </div>
                                            </div>
                                            <div v-if="createform.audience.recomentRadio=='TITKOT'" key="TITKOT">
                                                <div class="flexbox flexcenter" style="height:56px;padding:0 12px">
                                                    <el-cascader ref="titokTalentRef" v-model="createform.audience.category_id" :options="createform.audience.tiktokTypeOption" @change="changeTitokTalent" :props="{label:'value',value:'id',emitPath:false}" size="small" style="width:100%"></el-cascader>
                                                </div>
                                                <!-- <div class="flexbox flexcenter has_checked_talent">
                                                    <el-link type="primary" icon="el-icon-caret-left" :underline="false">返回</el-link>
                                                    <span class="has_checked_line"></span>
                                                    “浪胃仙”的相似抖音达人
                                                </div> -->
                                                <div v-loading="talent_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                    <div class="over_box" style="height:243px">
                                                        <el-checkbox-group v-model="createform.audience.titokTalentVal" class="talent_check" @change="checkTitokTalent">
                                                            <el-checkbox :label="item.label_id" v-for="(item,index) in createform.audience.titokTalentList" :key="index" @change="checkTitokChild(item)">
                                                                <div class="flex flexbox flexcenter" style="min-width:0">
                                                                    <img :src="item.avatar" class="talent_head" alt="">
                                                                    <div class="talent_info flex">
                                                                        <div class="talent_name">{{item.author_name}}（ID: {{item.label_id}}）</div>
                                                                        <div class="talent_fans flexbox flexcenter">
                                                                            <span>粉丝：{{item.total_fans_num_str}}</span>
                                                                            <span class="has_checked_line"></span>
                                                                            <span>分类：{{item.category_name}}</span>
                                                                        </div>
                                                                    </div>
                                                                    <!-- <el-link type="primary" @click.stop='findLike(item)' :underline="false">找相似</el-link> -->
                                                                </div>
                                                            </el-checkbox>
                                                        </el-checkbox-group>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="cascader_right">
                                            <div class="cas_header2 flexcolumn flexbox flexjust">
                                                <div class="flexbox flexcenter flexbetween">
                                                    <div>还可添加 <el-link :type="30 - createform.audience.tiktokAllCheck.length>0?'primary':'danger'" :underline="false">{{30 - createform.audience.tiktokAllCheck.length }}</el-link> 个</div>
                                                    <el-link type="primary" :underline="false" @click="clearTalentNode('tiktokType')">清空</el-link>
                                                </div>
                                                <div style="margin-top:5px">
                                                    <span class="talent_12">达人分类：{{createform.audience.tiktokTypeCheck.length}}</span>
                                                    <span class="talent_12">抖音达人：{{createform.audience.titokTalentText.length}}</span>
                                                </div>
                                            </div>
                                            <div class="cas_header flexbox flexcenter">
                                                <span class="flex">内容</span>
                                                <span class="flex">预估覆盖数</span>
                                            </div>
                                            <div class="has_talent_box over_box" style="height:260px">
                                                <div class="has_talent_item flexbox flexcenter" v-for="(item,index) in createform.audience.tiktokAllCheck" :key="index">
                                                    <div class="has_talent_name flex">{{item.name}}</div>
                                                    <div class="has_talent_num flex flexbox flexbetween">
                                                        <span>{{item.cover}}</span>
                                                        <el-link :underline="false" icon="el-icon-close" @click="deletTiktokCheck(item,index)"></el-link>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </el-form-item>
                        </el-form-item>
                        <template v-if="dataForm.extension=='SIMPLE' && dataForm.market=='LIVE_PROM_GOODS'">
                            <el-form-item label="行为兴趣意向" prop="title" v-if="createform.lab_ad_type =='LAB_AD'">
                                <el-radio-group v-model="createform.audience.smart_interest_action" size="small" @change="swicthAction">
                                    <el-radio-button label="RECOMMEND">系统推荐</el-radio-button>
                                    <el-radio-button label="CUSTOM">自定义</el-radio-button>
                                </el-radio-group>
                                <div class="cascader_box" v-if="createform.audience.smart_interest_action=='CUSTOM'" key="CUSTOM">
                                    <el-form-item label="" :prop="`audience.actionAllCheck`">
                                        <div class="form_title flexbox flexcenter font_14">行为</div>
                                        <div class="flexbox flexcenter">
                                            在
                                            <el-select v-model="createform.audience.action_scene" multiple collapse-tags placeholder="" size="small" style="margin:0 12px;width:208px" @change="changeAction">
                                                <el-option :label="item.name" :value="item.id" v-for="(item,index) in actionList" :key="index"></el-option>
                                            </el-select>
                                            中，选择用户
                                            <el-select v-model="createform.audience.action_days" @change="selectActionDay" placeholder="" size="small" style="margin:0 12px;width:90px">
                                                <el-option :label="item.label" :value="item.id" v-for="(item,index) in actionDay" :key="index"></el-option>
                                            </el-select>
                                            内发生的行为
                                        </div>
                                        <div style="margin-top:15px" class="flexbox flexcenter">
                                            <span class="font_14 color_01">行为类目词搜索：</span>
                                            <el-cascader v-model="createform.audience.action_val" ref="actionRef" filterable size="small" class="flex" collapse-tags :options="createform.audience.actionList" :props="{multiple:true,label:'name',value:'id',}" @change="getActionVal" style="width:330px">
                                            </el-cascader>
                                        </div>
                                        <div style="margin-top:15px" class="flexbox flexcenter">
                                            <span class="font_14 color_01">行为关键词搜索：</span>
                                            <el-input placeholder="行为关键词" @change="findMoreActionKey()" clearable class="flex" size="small" prefix-icon="el-icon-search" v-model="createform.audience.actionKeyText">
                                            </el-input>
                                        </div>
                                        <div class="flexbox flexbetween" style="margin-top:16px">
                                            <div class="cascader_left">
                                                <div class="cas_header2 flexbox flexcenter">
                                                    <el-tabs v-model="createform.audience.actionTab" @tab-click="handleClick" class="tab_style">
                                                        <el-tab-pane label="类目词" name="1"></el-tab-pane>
                                                        <el-tab-pane label="关键词" name="2"></el-tab-pane>
                                                    </el-tabs>
                                                </div>
                                                <template v-if="createform.audience.actionTab==1">
                                                    <div class="cas_header flexbox flexcenter">
                                                        行为类目词
                                                    </div>
                                                    <div v-loading="als_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                        <div class="cas_center over_box flexbox">
                                                            <el-cascader-panel ref="actionRef" v-model="createform.audience.action_val" :options="createform.audience.actionList" :props="{multiple:true,label:'name',value:'id',}" @change="getActionVal">
                                                                <template slot-scope="{ node, data }">
                                                                    <div @click="getActionData(data)">
                                                                        {{data.name}}
                                                                    </div>
                                                                </template>
                                                            </el-cascader-panel>
                                                        </div>
                                                    </div>
                                                    <div class="word_box flexbox flexcolumn flexjust">
                                                        <span>关键词推荐</span>
                                                        <div v-if="createform.audience.actionKeyText">
                                                            <el-link type="primary" :underline="false" @click="findMoreActionKey">查看更多相关{{createform.audience.actionKeyText}}的关键词</el-link>
                                                        </div>
                                                        <div class="font_13 color_02" v-else>选择类目词后, 根据相关性推荐关键词</div>
                                                    </div>
                                                </template>
                                                <template v-else>
                                                    <div class="cas_header flexbox flexcenter">
                                                        {{createform.audience.actionKeyText?createform.audience.actionKeyText:'关键词'}}
                                                    </div>
                                                    <div v-loading="aky_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                        <div class="over_box" style="height:268px">
                                                            <div class="action_key_item flexbox flexcenter" v-for="(item,index) in createform.audience.action_key_list" :key="index">
                                                                <div class="act_key_name flex">{{item.name}}</div>
                                                                <div class="act_key_num">{{item.num}}</div>
                                                                <div class="act_key_btn">
                                                                    <el-link type="primary" :disabled="item.check" :underline="false" @click="addActionKey(item,index)">添加</el-link>
                                                                    <el-link type="primary" :underline="false" style="margin-left:10px" @click="findActionKey(item)">查关键词</el-link>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </template>
                                            </div>

                                            <div class="cascader_right">
                                                <div class="cas_header2 flexcolumn flexbox flexjust">
                                                    <div class="flexbox flexcenter flexbetween">
                                                        <div>还可添加 <el-link type="primary" :underline="false">{{350-createform.audience.actionAllCheck.length}}</el-link> 个</div>
                                                        <el-link type="primary" :underline="false" @click="clearActionKey">清空</el-link>
                                                    </div>
                                                    <div style="margin-top:5px">
                                                        <span class="talent_12">类目词：{{createform.audience.action_text.length}}</span>
                                                        <span class="talent_12">关键词：{{createform.audience.action_key_text.length}}</span>
                                                    </div>
                                                </div>
                                                <div class="cas_header flexbox flexcenter">
                                                    <span class="flex">内容</span>
                                                    <span class="flex">预估覆盖数</span>
                                                </div>
                                                <div class="has_talent_box over_box" style="height:269px">
                                                    <div class="has_talent_item flexbox flexcenter" v-for="(item,index) in createform.audience.actionAllCheck" :key="index">
                                                        <div class="has_talent_name flex">{{item.name}}</div>
                                                        <div class="has_talent_num flex flexbox flexbetween">
                                                            <span>{{item.num}}</span>
                                                            <div>
                                                                <el-link :underline="false" icon="el-icon-search" @click="findActionKey(item)"></el-link>
                                                                <el-link :underline="false" icon="el-icon-close" @click="deletAction(item,index)"></el-link>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </el-form-item>
                                    <el-form-item label="" :prop="`audience.interestAllCheck`">
                                        <div class="form_title flexbox flexcenter font_14" style="margin-top:25px">兴趣</div>
                                        <div style="margin-top:15px" class="flexbox flexcenter">
                                            <span class="font_14 color_01">兴趣类目词搜索：</span>
                                            <el-cascader v-model="createform.audience.interest_val" ref="interestRef" filterable size="small" class="flex" collapse-tags :options="createform.audience.interestList" :props="{multiple:true,label:'name',value:'id',}" @change="getInterestVal" style="width:330px">
                                            </el-cascader>
                                        </div>
                                        <div style="margin-top:15px" class="flexbox flexcenter">
                                            <span class="font_14 color_01">兴趣关键词搜索：</span>
                                            <el-input placeholder="兴趣关键词" @change="findMoreInterestKey()" clearable class="flex" size="small" prefix-icon="el-icon-search" v-model="createform.audience.interestKeyText">
                                            </el-input>
                                        </div>
                                        <div class="flexbox flexbetween" style="margin-top:16px">
                                            <div class="cascader_left">
                                                <div class="cas_header2 flexbox flexcenter">
                                                    <el-tabs v-model="createform.audience.interestTab" @tab-click="handleClick" class="tab_style">
                                                        <el-tab-pane label="类目词" name="1"></el-tab-pane>
                                                        <el-tab-pane label="关键词" name="2"></el-tab-pane>
                                                    </el-tabs>
                                                </div>
                                                <template v-if="createform.audience.interestTab==1">
                                                    <div class="cas_header flexbox flexcenter">
                                                        兴趣类目词
                                                    </div>
                                                    <div v-loading="ils_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                        <div class="cas_center over_box flexbox">
                                                            <el-cascader-panel ref="interestRef" v-model="createform.audience.interest_val" :options="createform.audience.interestList" :props="{multiple:true,label:'name',value:'id',}" @change="getInterestVal">
                                                                <template slot-scope="{ node, data }">
                                                                    <div @click="getInterestData(data)">
                                                                        {{data.name}}
                                                                    </div>
                                                                </template>
                                                            </el-cascader-panel>
                                                        </div>
                                                    </div>
                                                    <div class="word_box flexbox flexcolumn flexjust">
                                                        <span>关键词推荐</span>
                                                        <div v-if="createform.audience.interestKeyText">
                                                            <el-link type="primary" :underline="false" @click="findMoreInterestKey">查看更多相关{{createform.audience.interestKeyText}}的关键词</el-link>
                                                        </div>
                                                        <div class="font_13 color_02" v-else>选择类目词后, 根据相关性推荐关键词</div>
                                                    </div>
                                                </template>
                                                <template v-else>
                                                    <div class="cas_header flexbox flexcenter">
                                                        {{createform.audience.interestKeyText?createform.audience.interestKeyText:'关键词'}}
                                                    </div>
                                                    <div v-loading="iky_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                        <div class="over_box" style="height:268px">
                                                            <div class="action_key_item flexbox flexcenter" v-for="(item,index) in createform.audience.interest_key_list" :key="index">
                                                                <div class="act_key_name flex">{{item.name}}</div>
                                                                <div class="act_key_num">{{item.num}}</div>
                                                                <div class="act_key_btn">
                                                                    <el-link type="primary" :disabled="item.check" :underline="false" @click="addInterestKey(item,index)">添加</el-link>
                                                                    <el-link type="primary" :underline="false" style="margin-left:10px" @click="findInterestKey(item)">查关键词</el-link>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </template>
                                            </div>

                                            <div class="cascader_right">
                                                <div class="cas_header2 flexcolumn flexbox flexjust">
                                                    <div class="flexbox flexcenter flexbetween">
                                                        <div>还可添加 <el-link type="primary" :underline="false">{{350-createform.audience.interestAllCheck.length}}</el-link> 个</div>
                                                        <el-link type="primary" :underline="false" @click="clearInterestKey">清空</el-link>
                                                    </div>
                                                    <div style="margin-top:5px">
                                                        <span class="talent_12">类目词：{{createform.audience.interest_text.length}}</span>
                                                        <span class="talent_12">关键词：{{createform.audience.interest_key_text.length}}</span>
                                                    </div>
                                                </div>
                                                <div class="cas_header flexbox flexcenter">
                                                    <span class="flex">内容</span>
                                                    <span class="flex">预估覆盖数</span>
                                                </div>
                                                <div class="has_talent_box over_box" style="height:269px">
                                                    <div class="has_talent_item flexbox flexcenter" v-for="(item,index) in createform.audience.interestAllCheck" :key="index">
                                                        <div class="has_talent_name flex">{{item.name}}</div>
                                                        <div class="has_talent_num flex flexbox flexbetween">
                                                            <span>{{item.num}}</span>
                                                            <div>
                                                                <el-link :underline="false" icon="el-icon-search" @click="findInterestKey(item)"></el-link>
                                                                <el-link :underline="false" icon="el-icon-close" @click="deletInterest(item,index)"></el-link>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </el-form-item>
                                </div>
                            </el-form-item>
                        </template>
                    </template>
                    <template v-if="dataForm.extension=='STANDARD'">
                        <el-form-item label="更多人群" prop="title">
                            <el-radio-group v-model="createform.audience.crowdRadio" size="small" @change="changeCrowd">
                                <el-radio-button label="1">不限</el-radio-button>
                                <el-radio-button label="2">更多人群</el-radio-button>
                            </el-radio-group>
                            <el-form-item label="" :prop="`audience.allCrowdCheck`" v-if="createform.audience.crowdRadio==2" key="allCrowdCheck">
                                <div class="cascader_box cascader_box2">
                                    <div class="flexbox flexbetween">
                                        <div class="cascader_left" style="width:450px">
                                            <div class="cas_header2 flexbox flexcenter">
                                                <el-tabs v-model="createform.audience.crowdTab" @tab-click="sessionSave" class="tab_style">
                                                    <el-tab-pane label="平台精选" name="1"></el-tab-pane>
                                                    <el-tab-pane label="自定义人群" name="2"></el-tab-pane>
                                                </el-tabs>
                                            </div>
                                            <div v-loading="pt_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                <div class="over_box" style="height:231px;padding:10px 0" v-if="createform.audience.crowdTab==1" key="ptjx">
                                                    <el-checkbox-group v-model="createform.audience.plartformVal" class="talent_check" @change="checkPlartCrowd">
                                                        <el-checkbox :label="item.retargeting_tags_id+''" v-for="(item,index) in createform.audience.plartformCrow" :key="index">
                                                            <div class="flex flexbox flexcenter">
                                                                <div class="talent_info flex">
                                                                    <div class="talent_name flexbox flexcenter">
                                                                        <span>{{item.name}}</span>
                                                                        <span class="el-icon-question" style="color:#CFD4DD;margin:0 5px"></span>
                                                                        <el-tag size="mini" type="info" v-if="item.retargeting_tags_op=='INCLUDE'">定向</el-tag>
                                                                        <el-tag size="mini" type="info" v-else-if="item.retargeting_tags_op=='EXCLUDE'">排除</el-tag>
                                                                    </div>
                                                                    <div class="talent_fans flexbox flexcenter">
                                                                        <span class="font_13">预估覆盖人群 {{item.cover_num | unitText}}</span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </el-checkbox>
                                                    </el-checkbox-group>
                                                </div>
                                            </div>
                                            <div v-if="createform.audience.crowdTab==2" key="zdyrq">
                                                <div class="flexbox flexcenter" style="height:56px;padding:0 12px">
                                                    <el-input size="small" placeholder="输入人群包名称" prefix-icon="el-icon-search" clearable v-model="crowdQuery">
                                                    </el-input>
                                                </div>
                                                <div v-loading="zdy_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                    <div class="over_box" style="height:195px">
                                                        <div class="crowd_list flexbox flexcenter flexbetween" v-for="(item,index) in filterCustomCrowd(createform.audience.customCrow)" :key="index">
                                                            <div class="crowd_left">
                                                                <div class="crowd_name">{{item.name}}</div>
                                                                <div class="crowd_num">预估覆盖人群 {{item.cover_num | unitText}}</div>
                                                            </div>
                                                            <div class="crowd_right">
                                                                <el-link type="primary" :disabled="item.retargeting_tags_op=='INCLUDE'" :underline="false" @click="addCustomCrowd('INCLUDE',index,item)">定向</el-link>
                                                                <el-link type="primary" :disabled="item.retargeting_tags_op=='EXCLUDE'" :underline="false" @click="addCustomCrowd('EXCLUDE',index,item)">排除</el-link>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="cascader_right" style="width:226px">
                                            <div class="cas_header2 flexcolumn flexbox flexjust">
                                                <div class="flexbox flexcenter flexbetween">
                                                    <div>已选 <el-link type="primary" :underline="false">{{createform.audience.allCrowdCheck.length}}</el-link> 个</div>
                                                    <el-link type="primary" :underline="false" @click="clearCrowd">清空</el-link>
                                                </div>
                                            </div>
                                            <div class="cas_header flexbox flexcenter">
                                                <span class="flex">人群包</span>
                                                <div style="width:60px">
                                                    <el-dropdown>
                                                        <span class="color_01">
                                                            <template v-if="createform.audience.crowdDrop=='ALL'">
                                                                全部
                                                            </template>
                                                            <template v-else-if="createform.audience.crowdDrop=='INCLUDE'">
                                                                定向
                                                            </template>
                                                            <template v-else-if="createform.audience.crowdDrop=='EXCLUDE'">
                                                                排除
                                                            </template>
                                                            <i class="el-icon-caret-bottom el-icon--right"></i>
                                                        </span>
                                                        <el-dropdown-menu slot="dropdown">
                                                            <el-dropdown-item :class="{'active':createform.audience.crowdDrop=='ALL'}" @click.native="checkCrowdDrop('ALL')">全部</el-dropdown-item>
                                                            <el-dropdown-item :class="{'active':createform.audience.crowdDrop=='INCLUDE'}" @click.native="checkCrowdDrop('INCLUDE')">定向</el-dropdown-item>
                                                            <el-dropdown-item :class="{'active':createform.audience.crowdDrop=='EXCLUDE'}" @click.native="checkCrowdDrop('EXCLUDE')">排除</el-dropdown-item>
                                                        </el-dropdown-menu>
                                                    </el-dropdown>
                                                </div>

                                            </div>
                                            <div class="has_talent_box over_box" style="height:212px">
                                                <div class="has_talent_item flexbox flexcenter" v-for="(item,index) in filterAllCrowd(createform.audience.allCrowdCheck,createform.audience.crowdDrop) " :key="index">
                                                    <div class="has_talent_name flex">{{item.name}}</div>
                                                    <div class="has_talent_num flexbox flexbetween" style="width:60px">
                                                        <span v-if="item.retargeting_tags_op=='INCLUDE'">定向</span>
                                                        <span v-else-if="item.retargeting_tags_op=='EXCLUDE'">排除</span>
                                                        <el-link :underline="false" icon="el-icon-close" @click="deletCrowdCheck(item,index)"></el-link>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </el-form-item>
                        </el-form-item>
                        <el-form-item label="智能放量" prop="title">
                            <el-radio-group v-model="createform.audience.auto_extend_enabled" size="small" @change="sessionSave">
                                <el-radio-button :label="0">不开启</el-radio-button>
                                <el-radio-button :label="1">开启</el-radio-button>
                            </el-radio-group>
                            <el-form-item label="" :prop="`audience.auto_extend_text`" v-if="createform.audience.auto_extend_enabled==1" key="auto_extend_text">
                                <div class="cascader_box cascader_box2">
                                    <div class="flexbox flexbetween">
                                        <div class="cascader_left" style="width:450px">
                                            <div class="cas_header flexbox flexcenter">可放开定向</div>
                                            <div class="cas_center over_box flexbox">
                                                <el-checkbox-group v-model="createform.audience.auto_extend_targets" style="width:100%" class="talent_check" @change="checkExtend">
                                                    <el-checkbox :label="item.id" v-for="(item,index) in extendList" :key="index">
                                                        <div class="intel_text">{{item.name}}</div>
                                                    </el-checkbox>
                                                </el-checkbox-group>
                                            </div>
                                        </div>
                                        <div class="cascader_right flexbox flexcolumn">
                                            <div class="cas_header flexbox flexcenter flexbetween">
                                                <span>已选</span>
                                                <el-link type="primary" :underline="false" @click="clearExtend">清空</el-link>
                                            </div>
                                            <div class="has_ckecked_box over_box">
                                                <div class="has_checked_item flexbox flexcenter flexbetween" v-for="(item,index) in createform.audience.auto_extend_text" :key="index">
                                                    <span class="has_checked_text">{{item.name}}</span>
                                                    <el-link class="has_checked_icon" icon='el-icon-close' :underline="false" @click="deletExtend(item,index)"></el-link>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </el-form-item>
                        </el-form-item>
                        <el-form-item label="平台" prop="platform">
                            <el-radio-group v-model="createform.audience.platform" size="small" @change="sessionSave">
                                <el-radio-button label="">不开启</el-radio-button>
                                <el-radio-button label="IOS">IOS</el-radio-button>
                                <el-radio-button label="ANDROID">安卓</el-radio-button>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="行为兴趣意向" prop="title" v-if="createform.lab_ad_type!='LAB_AD'">
                            <el-radio-group v-model="createform.audience.smart_interest_action" size="small" @change="swicthAction">
                                <el-radio-button label="">不开启</el-radio-button>
                                <el-radio-button label="RECOMMEND">系统推荐</el-radio-button>
                                <el-radio-button label="CUSTOM">自定义</el-radio-button>
                            </el-radio-group>
                            <div class="cascader_box" v-if="createform.audience.smart_interest_action=='CUSTOM'" key="CUSTOM">
                                <el-form-item label="" :prop="`audience.actionAllCheck`">
                                    <div class="form_title flexbox flexcenter font_14">行为</div>
                                    <div class="flexbox flexcenter">
                                        在
                                        <el-select v-model="createform.audience.action_scene" multiple collapse-tags placeholder="" size="small" style="margin:0 12px;width:208px" @change="changeAction">
                                            <el-option :label="item.name" :value="item.id" v-for="(item,index) in actionList" :key="index"></el-option>
                                        </el-select>
                                        中，选择用户
                                        <el-select v-model="createform.audience.action_days" @change="selectActionDay" placeholder="" size="small" style="margin:0 12px;width:90px">
                                            <el-option :label="item.label" :value="item.id" v-for="(item,index) in actionDay" :key="index"></el-option>
                                        </el-select>
                                        内发生的行为
                                    </div>
                                    <!-- <el-input placeholder="支持搜索达人、抖音昵称或抖音达人所在分类" style="width:427px;margin-top:15px" size="small" prefix-icon="el-icon-search" v-model="input2">
                                    </el-input> -->
                                    <div style="margin-top:15px" class="flexbox flexcenter">
                                        <span class="font_14 color_01">行为类目词搜索：</span>
                                        <el-cascader v-model="createform.audience.action_val" ref="actionRef" filterable size="small" class="flex" collapse-tags :options="createform.audience.actionList" :props="{multiple:true,label:'name',value:'id',}" @change="getActionVal" style="width:330px">
                                        </el-cascader>
                                    </div>
                                    <div style="margin-top:15px" class="flexbox flexcenter">
                                        <span class="font_14 color_01">行为关键词搜索：</span>
                                        <el-input placeholder="行为关键词" @change="findMoreActionKey()" clearable class="flex" size="small" prefix-icon="el-icon-search" v-model="createform.audience.actionKeyText">
                                        </el-input>
                                    </div>
                                    <div class="flexbox flexbetween" style="margin-top:16px">
                                        <div class="cascader_left">
                                            <div class="cas_header2 flexbox flexcenter">
                                                <el-tabs v-model="createform.audience.actionTab" @tab-click="handleClick" class="tab_style">
                                                    <el-tab-pane label="类目词" name="1"></el-tab-pane>
                                                    <el-tab-pane label="关键词" name="2"></el-tab-pane>
                                                </el-tabs>
                                            </div>
                                            <template v-if="createform.audience.actionTab==1">
                                                <div class="cas_header flexbox flexcenter">
                                                    行为类目词
                                                </div>
                                                <div v-loading="als_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                    <div class="cas_center over_box flexbox">
                                                        <el-cascader-panel ref="actionRef" v-model="createform.audience.action_val" :options="createform.audience.actionList" :props="{multiple:true,label:'name',value:'id',}" @change="getActionVal">
                                                            <template slot-scope="{ node, data }">
                                                                <div @click="getActionData(data)">
                                                                    {{data.name}}
                                                                </div>
                                                            </template>
                                                        </el-cascader-panel>
                                                    </div>
                                                </div>
                                                <div class="word_box flexbox flexcolumn flexjust">
                                                    <span>关键词推荐</span>
                                                    <div v-if="createform.audience.actionKeyText">
                                                        <el-link type="primary" :underline="false" @click="findMoreActionKey">查看更多相关{{createform.audience.actionKeyText}}的关键词</el-link>
                                                    </div>
                                                    <div class="font_13 color_02" v-else>选择类目词后, 根据相关性推荐关键词</div>
                                                </div>
                                            </template>
                                            <template v-else>
                                                <div class="cas_header flexbox flexcenter">
                                                    {{createform.audience.actionKeyText?createform.audience.actionKeyText:'关键词'}}
                                                </div>
                                                <div v-loading="aky_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                    <div class="over_box" style="height:268px">
                                                        <div class="action_key_item flexbox flexcenter" v-for="(item,index) in createform.audience.action_key_list" :key="index">
                                                            <div class="act_key_name flex">{{item.name}}</div>
                                                            <div class="act_key_num">{{item.num}}</div>
                                                            <div class="act_key_btn">
                                                                <el-link type="primary" :disabled="item.check" :underline="false" @click="addActionKey(item,index)">添加</el-link>
                                                                <el-link type="primary" :underline="false" style="margin-left:10px" @click="findActionKey(item)">查关键词</el-link>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <!-- <div class="word_box flexbox flexcolumn flexjust">
                                                    <span>关键词推荐</span>
                                                    <div class="font_13 color_02">选择类目词后, 根据相关性推荐关键词</div>
                                                </div> -->
                                            </template>
                                        </div>

                                        <div class="cascader_right">
                                            <div class="cas_header2 flexcolumn flexbox flexjust">
                                                <div class="flexbox flexcenter flexbetween">
                                                    <div>还可添加 <el-link type="primary" :underline="false">{{350-createform.audience.actionAllCheck.length}}</el-link> 个</div>
                                                    <el-link type="primary" :underline="false" @click="clearActionKey">清空</el-link>
                                                </div>
                                                <div style="margin-top:5px">
                                                    <span class="talent_12">类目词：{{createform.audience.action_text.length}}</span>
                                                    <span class="talent_12">关键词：{{createform.audience.action_key_text.length}}</span>
                                                </div>
                                            </div>
                                            <div class="cas_header flexbox flexcenter">
                                                <span class="flex">内容</span>
                                                <span class="flex">预估覆盖数</span>
                                            </div>
                                            <div class="has_talent_box over_box" style="height:269px">
                                                <div class="has_talent_item flexbox flexcenter" v-for="(item,index) in createform.audience.actionAllCheck" :key="index">
                                                    <div class="has_talent_name flex">{{item.name}}</div>
                                                    <div class="has_talent_num flex flexbox flexbetween">
                                                        <span>{{item.num}}</span>
                                                        <div>
                                                            <el-link :underline="false" icon="el-icon-search" @click="findActionKey(item)"></el-link>
                                                            <el-link :underline="false" icon="el-icon-close" @click="deletAction(item,index)"></el-link>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </el-form-item>
                                <el-form-item label="" :prop="`audience.interestAllCheck`">
                                    <div class="form_title flexbox flexcenter font_14" style="margin-top:25px">兴趣</div>
                                    <div style="margin-top:15px" class="flexbox flexcenter">
                                        <span class="font_14 color_01">兴趣类目词搜索：</span>
                                        <el-cascader v-model="createform.audience.interest_val" ref="interestRef" filterable size="small" class="flex" collapse-tags :options="createform.audience.interestList" :props="{multiple:true,label:'name',value:'id',}" @change="getInterestVal" style="width:330px">
                                        </el-cascader>
                                    </div>
                                    <div style="margin-top:15px" class="flexbox flexcenter">
                                        <span class="font_14 color_01">兴趣关键词搜索：</span>
                                        <el-input placeholder="兴趣关键词" @change="findMoreInterestKey()" clearable class="flex" size="small" prefix-icon="el-icon-search" v-model="createform.audience.interestKeyText">
                                        </el-input>
                                    </div>
                                    <div class="flexbox flexbetween" style="margin-top:16px">
                                        <div class="cascader_left">
                                            <div class="cas_header2 flexbox flexcenter">
                                                <el-tabs v-model="createform.audience.interestTab" @tab-click="handleClick" class="tab_style">
                                                    <el-tab-pane label="类目词" name="1"></el-tab-pane>
                                                    <el-tab-pane label="关键词" name="2"></el-tab-pane>
                                                </el-tabs>
                                            </div>
                                            <template v-if="createform.audience.interestTab==1">
                                                <div class="cas_header flexbox flexcenter">
                                                    兴趣类目词
                                                </div>
                                                <div v-loading="ils_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                    <div class="cas_center over_box flexbox">
                                                        <el-cascader-panel ref="interestRef" v-model="createform.audience.interest_val" :options="createform.audience.interestList" :props="{multiple:true,label:'name',value:'id',}" @change="getInterestVal">
                                                            <template slot-scope="{ node, data }">
                                                                <div @click="getInterestData(data)">
                                                                    {{data.name}}
                                                                </div>
                                                            </template>
                                                        </el-cascader-panel>
                                                    </div>
                                                </div>
                                                <div class="word_box flexbox flexcolumn flexjust">
                                                    <span>关键词推荐</span>
                                                    <div v-if="createform.audience.interestKeyText">
                                                        <el-link type="primary" :underline="false" @click="findMoreInterestKey">查看更多相关{{createform.audience.interestKeyText}}的关键词</el-link>
                                                    </div>
                                                    <div class="font_13 color_02" v-else>选择类目词后, 根据相关性推荐关键词</div>
                                                </div>
                                            </template>
                                            <template v-else>
                                                <div class="cas_header flexbox flexcenter">
                                                    {{createform.audience.interestKeyText?createform.audience.interestKeyText:'关键词'}}
                                                </div>
                                                <div v-loading="iky_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                                    <div class="over_box" style="height:268px">
                                                        <div class="action_key_item flexbox flexcenter" v-for="(item,index) in createform.audience.interest_key_list" :key="index">
                                                            <div class="act_key_name flex">{{item.name}}</div>
                                                            <div class="act_key_num">{{item.num}}</div>
                                                            <div class="act_key_btn">
                                                                <el-link type="primary" :disabled="item.check" :underline="false" @click="addInterestKey(item,index)">添加</el-link>
                                                                <el-link type="primary" :underline="false" style="margin-left:10px" @click="findInterestKey(item)">查关键词</el-link>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <!-- <div class="word_box flexbox flexcolumn flexjust">
                                                    <span>关键词推荐</span>
                                                    <div class="font_13 color_02">选择类目词后, 根据相关性推荐关键词</div>
                                                </div> -->
                                            </template>
                                        </div>

                                        <div class="cascader_right">
                                            <div class="cas_header2 flexcolumn flexbox flexjust">
                                                <div class="flexbox flexcenter flexbetween">
                                                    <div>还可添加 <el-link type="primary" :underline="false">{{350-createform.audience.interestAllCheck.length}}</el-link> 个</div>
                                                    <el-link type="primary" :underline="false" @click="clearInterestKey">清空</el-link>
                                                </div>
                                                <div style="margin-top:5px">
                                                    <span class="talent_12">类目词：{{createform.audience.interest_text.length}}</span>
                                                    <span class="talent_12">关键词：{{createform.audience.interest_key_text.length}}</span>
                                                </div>
                                            </div>
                                            <div class="cas_header flexbox flexcenter">
                                                <span class="flex">内容</span>
                                                <span class="flex">预估覆盖数</span>
                                            </div>
                                            <div class="has_talent_box over_box" style="height:269px">
                                                <div class="has_talent_item flexbox flexcenter" v-for="(item,index) in createform.audience.interestAllCheck" :key="index">
                                                    <div class="has_talent_name flex">{{item.name}}</div>
                                                    <div class="has_talent_num flex flexbox flexbetween">
                                                        <span>{{item.num}}</span>
                                                        <div>
                                                            <el-link :underline="false" icon="el-icon-search" @click="findInterestKey(item)"></el-link>
                                                            <el-link :underline="false" icon="el-icon-close" @click="deletInterest(item,index)"></el-link>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </el-form-item>
                            </div>
                        </el-form-item>
                        <el-form-item label="网络" prop="title">
                            <div class="flexbox flexcenter checked_list">
                                <el-radio label="1" v-model="createform.audience.ac_null" @change="changeAcNull">
                                    <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">不限</div>
                                </el-radio>
                                <el-checkbox-group v-model="createform.audience.ac" @change="changeAcHas">
                                    <el-checkbox label="WIFI">
                                        <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">WIFI</div>
                                    </el-checkbox>
                                    <el-checkbox label="2G">
                                        <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">2G</div>
                                    </el-checkbox>
                                    <el-checkbox label="3G">
                                        <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">3G</div>
                                    </el-checkbox>
                                    <el-checkbox label="4G">
                                        <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">4G</div>
                                    </el-checkbox>
                                    <el-checkbox label="5G">
                                        <div class="checked_item"><img src="../../assets/img/market_checked.svg" alt="" class="conversion_check">5G</div>
                                    </el-checkbox>
                                </el-checkbox-group>
                            </div>
                        </el-form-item>
                    </template>
                </div>

                <!-- 制作创意 -->
                <div class="com_box pd_20 mt_12" style="display:block">
                    <div class="market_title">制作创意</div>
                    <el-form-item label="" prop="title" v-if="createform.creative_way=='VIDEO' || dataForm.market=='VIDEO_PROM_GOODS' || createform.creative_way.includes('VIDEO')">
                        <div class="flexbox flexcenter">
                            <el-popover placement="bottom" width="460" trigger="click">
                                <div class="yusuan_num">创意组：{{createform.creatinfo_list.length}} /10</div>
                                <div class="yusuan_list">
                                    <div class="yusuan_item flexbox flexcenter flexbetween" @click="seletCreatinfo(item,index)" :class="{'active':index==createform.creatinfo_active}" v-for="(item,index) in createform.creatinfo_list" :key="index">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="ys_check">
                                        <el-input v-model="item.model_name" placeholder="请输入内容" size="small" class="ys_input" @input="changePlanKey(6,item.model_name)"></el-input>
                                        <div class="yusuan_edit flexbox flexcenter">
                                            <el-tooltip content="删除" placement="top">
                                                <span class="icon_btn" @click.stop="deletCreatinfo(index)"><img src="../../assets/img/ys_icon2.svg" alt=""></span>
                                            </el-tooltip>
                                        </div>
                                    </div>
                                </div>
                                <div class="yusuan_btn flexbox flexbetween">
                                    <el-button size="mini" style="width:100%" @click="addCreatinfo">添加创意组</el-button>
                                </div>
                                <div slot="reference" class="select_box flexbox flexcenter flexbetween">
                                    <span class="select_text">{{createform.creatinfo.model_name}}</span>
                                    <span class="el-icon-caret-bottom"></span>
                                </div>
                            </el-popover>
                            <div class="yusuan_num" style="font-size:14px;margin-left:16px">创意组：{{createform.creatinfo_list.length}} /10</div>
                        </div>
                    </el-form-item>
                    <el-form-item label="创意形式" prop="creative_way" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}" v-if="dataForm.market=='LIVE_PROM_GOODS'" key="LIVE_PROM_GOODS">
                        <el-checkbox-group v-model="createform.creative_way" @change="changeCreativeWay2" size="medium" v-if="createform.lab_ad_type=='LAB_AD'">
                            <el-checkbox-button  label="LIVE">直播间画面</el-checkbox-button>
                            <el-checkbox-button  label="VIDEO">视频</el-checkbox-button>
                        </el-checkbox-group>
                        <el-radio-group v-model="createform.creative_way" size="small" @change="changeCreativeWay" v-else>
                            <el-radio-button label="LIVE">直播间画面</el-radio-button>
                            <el-radio-button label="VIDEO">视频</el-radio-button>
                        </el-radio-group>
                    </el-form-item>
                    <template v-if="createform.creative_way=='VIDEO' || dataForm.market=='VIDEO_PROM_GOODS' || createform.creative_way.includes('VIDEO')">
                        <el-form-item label="创意类型" prop="title" v-if="dataForm.extension=='STANDARD'">
                            <el-radio-group v-model="createform.creative_material_mode" size="small" @change="changeCreativeMode">
                                <el-radio-button label="PROGRAMMATIC_CREATIVE" :disabled="dataForm.is_talent">程序化创意</el-radio-button>
                                <el-radio-button label="CUSTOM_CREATIVE"  :disabled="createform.lab_ad_type=='LAB_AD'">自定义创意</el-radio-button>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="添加创意内容" :prop="`creatinfo.creative`">
                            <div class="originality_box">
                                <div class="flexbox flexcenter flexbetween">
                                    <div>
                                        <el-button plain class="plain_blue" size="small" @click="addMateri()">
                                            <div class="flexbox flexcenter"><img src="../../assets/img/pot_video.svg" width="16" height="16" alt="" class="btn_img"> 添加视频</div>
                                        </el-button>
                                        <el-button plain class="plain_blue" size="small" @click="addPicture()" :disabled="dataForm.is_talent" v-if="dataForm.market=='VIDEO_PROM_GOODS' && createform.external_action=='AD_CONVERT_TYPE_SHOPPING' && dataForm.extension=='STANDARD'">
                                            <div class="flexbox flexcenter"><img src="../../assets/img/pot_picture.svg" width="16" height="16" alt="" class="btn_img"> 添加图片</div>
                                        </el-button>
                                        <el-button plain size="small" v-if="createform.creative_material_mode=='CUSTOM_CREATIVE' && createform.creatinfo.creative.length>0" @click="batchAddTitle(2)">
                                            <div class="flexbox flexcenter flexjust">
                                                <svg width="16" height="16" viewBox="0 0 16 16" stroke='#616C85' class="stroke_svg btn_svg" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                    <circle cx="8" cy="8" r="5.25" stroke="inherit" stroke-width="1.5" />
                                                </svg>
                                                批量设置标题
                                            </div>
                                        </el-button>
                                    </div>
                                    <div class="">已选：{{createform.creatinfo.creative.length}}/9</div>
                                </div>
                                <template v-if="createform.creatinfo.creative.length>0">
                                    <div class="origin_list1 flexbox" v-if="createform.creative_material_mode=='PROGRAMMATIC_CREATIVE'">
                                        <div class="origin_cxh_item" v-for="(item,index) in createform.creatinfo.creative" :key="index">
                                            <img src="../../assets/img/close_icon.svg" alt="" class="origin_cxh_close" @click="deletMateri(index)">
                                            <div class="origin_cxh_top">
                                                <img :src="item.material.img_url" alt="" class="origin_cxh_img">
                                                <template v-if="item.material.cate_type!='img'">
                                                    <div class="origin_cxh_title" v-if="item.material.image_mode=='VIDEO_VERTICAL'">竖版视频</div>
                                                    <div class="origin_cxh_title" v-else-if="item.material.image_mode=='VIDEO_LARGE'">横版视频</div>
                                                    <div class="origin_cxh_time">{{secondToTimeStr(item.material.duration)}}</div>
                                                </template>
                                            </div>
                                            <div class="origin_cxh_footer flexbox flexcenter flexjust">
                                                <template v-if="item.material.cate_type!='img'">
                                                    <el-link :underline="false" @click="editMateri(index)">换视频</el-link>
                                                    <el-divider direction="vertical"></el-divider>
                                                </template>
                                                <el-link :underline="false" @click="editPicture(index)" :disabled="item.material.type==3">换封面</el-link>
                                            </div>
                                        </div>
                                    </div>
                                    <template v-else>
                                        <div class="origin_list2 flexbox" v-for="(item,index) in createform.creatinfo.creative" :key="index">
                                            <div class="origin_cxh_item">
                                                <div class="origin_cxh_top">
                                                    <img :src="item.material.img_url" alt="" class="origin_cxh_img">
                                                    <template v-if="item.material.cate_type!='img'">
                                                        <div class="origin_cxh_title" v-if="item.material.image_mode=='VIDEO_VERTICAL'">竖版视频</div>
                                                        <div class="origin_cxh_title" v-else-if="item.material.image_mode=='VIDEO_LARGE'">横版视频</div>
                                                        <div class="origin_cxh_time">{{secondToTimeStr(item.material.duration)}}</div>
                                                    </template>
                                                </div>
                                                <div class="origin_cxh_footer flexbox flexcenter flexjust">
                                                    <template v-if="item.material.cate_type!='img'">
                                                        <el-link :underline="false" @click="editMateri(index)">换视频</el-link>
                                                        <el-divider direction="vertical"></el-divider>
                                                    </template>
                                                    <el-link :underline="false" @click="editPicture(index)" :disabled="item.material.type==3">换封面</el-link>
                                                </div>
                                            </div>
                                            <div class="origin_zdy_info flex">
                                                <el-form-item label="" :prop="`creatinfo.creative.${index}.title`" :rules="createRules.checkTitle">
                                                    <div slot="label" class="flexbox flexcenter flexbetween" style="width:421px">
                                                        <span>创意标题</span>
                                                        <img src="../../assets/img/close_check.svg" alt="" @click="deletMateri(index)">
                                                    </div>
                                                    <el-popover placement="bottom" width="400" trigger="click" :disabled="item.material.type==3">
                                                        <div class="flexbox flexcenter flexbetween">
                                                            <div class="flexbox flexcenter">
                                                                <span>插入动态词包：</span>
                                                                <el-link :underline="false" class="ml_12" type="primary" @click="addWrodKey(item,word,index)" v-for="(word,windex) in keyWordFour" :key="windex">+{{word.name}}</el-link>
                                                            </div>
                                                            <el-link :underline="false" type="primary" @click="addMoreWord(item,index,1,'title')">+更多</el-link>
                                                        </div>
                                                        <el-input slot="reference" :disabled="item.material.type==3" @clear="clearWord(index)" @blur="blurEvent" @change="changeWordInfo(item,index)" clearable v-model="item.title" maxlength="55" show-word-limit placeholder="请输入内容" size="small"></el-input>
                                                    </el-popover>
                                                </el-form-item>
                                                <el-form-item label="推广卡片" prop="title" style="margin-top:20px" v-if="item.material.cate_type=='video' && dataForm.market=='VIDEO_PROM_GOODS' && dataForm.extension=='STANDARD'">
                                                    <div class="flexbox flexcenter">
                                                        <div class="card_box flexbox flexcenter">
                                                            <img :src="item.card.car_img" alt="" class="card_img">
                                                            <div class="card_info flex">
                                                                <div class="card_name">{{item.card.car_name}}</div>
                                                                <div class="card_text" v-for="(tag,tindex) in item.card.car_tag" :key="tindex" v-show="tindex==0">
                                                                    {{tag}}
                                                                </div>
                                                            </div>
                                                            <span class="card_btn">{{item.card.car_link}}</span>
                                                        </div>
                                                        <el-link type="primary" :underline="false" style="margin-left:16px" @click="editCardInfo(item.card,index,1)">更改</el-link>
                                                    </div>
                                                </el-form-item>
                                            </div>
                                        </div>
                                    </template>
                                </template>
                                <div class="creat_null" v-else>您还没有添加创意素材~</div>
                            </div>
                        </el-form-item>
                        <el-form-item label="" prop="title" v-if="createform.external_action=='AD_CONVERT_TYPE_SHOPPING' && dataForm.extension=='STANDARD'">
                            <el-checkbox v-model="createform.creative_auto_generate" @change="sessionSave" :true-label="1" :false-label="0">生成更多创意</el-checkbox>
                        </el-form-item>
                        <el-form-item label="抖音主页隐藏视频" prop="title">
                            <el-radio-group :disabled="dataForm.is_talent" v-model="createform.is_homepage_hide" @change="sessionSave" size="small">
                                <el-radio-button :label="1">隐藏</el-radio-button>
                                <el-radio-button :label="0">不隐藏</el-radio-button>
                            </el-radio-group>
                        </el-form-item>
                        <template  v-if="dataForm.market=='VIDEO_PROM_GOODS' && dataForm.extension=='STANDARD'">
                            <el-form-item label="优质素材自动同步投放" prop="enable_follow_material" :rules="{required: true, message: '请选择', trigger: ['blur', 'change']}" v-if="createform.lab_ad_type=='LAB_AD'">
                                <el-radio-group v-model="createform.enable_follow_material" size="small" @change="sessionSave">
                                    <el-radio-button :label="1">开启</el-radio-button>
                                    <el-radio-button :label="0">关闭</el-radio-button>
                                </el-radio-group>
                            </el-form-item>
                        </template>
                    </template>
                </div>

                <!-- 创意标题 -->
                <div class="com_box pd_20 mt_12" style="display:block" v-if="createform.creative_material_mode=='PROGRAMMATIC_CREATIVE'">
                    <div class="market_title">创意标题</div>
                    <el-form-item label="" prop="title">
                        <div class="flexbox flexcenter">
                            <el-popover placement="bottom" width="460" trigger="click">
                                <div class="yusuan_num">标题组：{{createform.creattitle_list.length}} /10</div>
                                <div class="yusuan_list">
                                    <div class="yusuan_item flexbox flexcenter flexbetween" @click="seletCreattitle(item,index)" :class="{'active':index==createform.creattitle_active}" v-for="(item,index) in createform.creattitle_list" :key="index">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="ys_check">
                                        <el-input v-model="item.model_name" placeholder="请输入内容" size="small" class="ys_input" @input="changePlanKey(7,item.model_name)"></el-input>
                                        <div class="yusuan_edit flexbox flexcenter">
                                            <el-tooltip content="存为模板" placement="top">
                                                <span class="icon_btn" @click.stop="saveModel(item,index,4)"><img src="../../assets/img/ys_icon1.svg" alt=""></span>
                                            </el-tooltip>
                                            <el-tooltip content="删除" placement="top">
                                                <span class="icon_btn" @click.stop="deletCreattitleModel(index)"><img src="../../assets/img/ys_icon2.svg" alt=""></span>
                                            </el-tooltip>
                                        </div>
                                    </div>
                                </div>
                                <div class="yusuan_btn flexbox flexbetween">
                                    <el-button size="mini" style="width:222px" @click="addCreattitleModel">添加标题组</el-button>
                                    <el-button size="mini" style="width:222px" @click="creattitleModel">选择模板</el-button>
                                </div>
                                <div slot="reference" class="select_box flexbox flexcenter flexbetween">
                                    <span class="select_text">{{createform.creattitle.model_name}}</span>
                                    <span class="el-icon-caret-bottom"></span>
                                </div>
                            </el-popover>
                            <div class="yusuan_num" style="font-size:14px;margin-left:16px">标题组：{{createform.creattitle_list.length}} /10</div>
                        </div>
                    </el-form-item>
                    <el-form-item label="添加创意标题" prop="title">
                        <div class="title_box">
                            <div class="flexbox flexcenter flexbetween">
                                <div class="flexbox flexcenter">
                                    <el-button plain class="plain_blue" size="small" icon="el-icon-circle-plus-outline" @click="addCreatTitle" :disabled="createform.creattitle.title.length>9">
                                        添加标题
                                    </el-button>
                                    <el-button plain size="small" v-if="createform.creattitle.title.length>0" @click="batchAddCreatTitle()">
                                        <div class="flexbox flexcenter flexjust">
                                            <svg width="16" height="16" viewBox="0 0 16 16" stroke='#616C85' class="stroke_svg btn_svg" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                <circle cx="8" cy="8" r="5.25" stroke="inherit" stroke-width="1.5" />
                                            </svg>
                                            批量添加标题
                                        </div>
                                    </el-button>
                                </div>

                                <span>已添加：{{createform.creattitle.title.length}}/10</span>
                            </div>
                            <el-form-item :label="'标题'+(index+1)" :prop="`creattitle.title.${index}.title`" :rules="createRules.checkTitle" v-for="(item,index) in createform.creattitle.title" :key="index" style="margin-top:20px">
                                <div class="flexbox flexcenter flexbetween">
                                    <el-popover placement="bottom" width="500" trigger="click">
                                        <div class="flexbox flexcenter flexbetween">
                                            <div class="flexbox flexcenter">
                                                <span>插入动态词包：</span>
                                                <el-link :underline="false" class="ml_12" type="primary" @click="addWrodKeyCxh(item,word,index)" v-for="(word,windex) in keyWordFour" :key="windex">+{{word.name}}</el-link>
                                            </div>
                                            <el-link :underline="false" type="primary" @click="addMoreWord(item,index,2,'dynamic_words')">+更多</el-link>
                                        </div>
                                        <el-input slot="reference" @blur="blurEvent" @focus="focusEvent" @change="changeWordTitle(item,index)" @clear="clearWordCxh(index)" clearable v-model="item.title" maxlength="55" style="width:524px" show-word-limit placeholder="请输入内容" size="small"></el-input>
                                    </el-popover>
                                    <!-- <el-input v-model="item.title" placeholder="请输入内容" style="width:524px" size="small"></el-input> -->
                                    <img src="../../assets/img/close_check.svg" alt="" @click="deletCreatTitle(index)">
                                </div>
                            </el-form-item>
                        </div>
                    </el-form-item>
                    <el-form-item label="推广卡片" prop="title" v-if="dataForm.market=='VIDEO_PROM_GOODS'">
                        <div class="flexbox flexcenter">
                            <div class="card_box flexbox flexcenter">
                                <img :src="createform.card.car_img" alt="" class="card_img">
                                <div class="card_info flex">
                                    <div class="card_name">{{createform.card.car_name}}</div>
                                    <div class="card_text">{{createform.card.car_tag[0]}}</div>
                                </div>
                                <span class="card_btn">{{createform.card.car_link}}</span>
                            </div>
                            <el-link type="primary" :underline="false" style="margin-left:16px" @click="editCardInfo(createform.card,null,2)">更改</el-link>
                        </div>
                    </el-form-item>
                </div>

                <!-- 创意分类 -->
                <div class="com_box pd_20 mt_12" style="display:block" v-if="dataForm.extension=='STANDARD'">
                    <div class="market_title">创意分类</div>
                    <el-form-item label="" prop="title">
                        <div class="flexbox flexcenter">
                            <el-popover placement="bottom" width="460" trigger="click">
                                <div class="yusuan_num">创意分类：{{createform.industry_list.length}} /10</div>
                                <div class="yusuan_list">
                                    <div class="yusuan_item flexbox flexcenter flexbetween" @click="seletIndustry(item,index)" :class="{'active':index==createform.industry_active}" v-for="(item,index) in createform.industry_list" :key="index">
                                        <img src="../../assets/img/market_checked.svg" alt="" class="ys_check">
                                        <el-input v-model="item.model_name" placeholder="请输入内容" size="small" class="ys_input" @input="changePlanKey(5,item.model_name)"></el-input>
                                        <div class="yusuan_edit flexbox flexcenter">
                                            <el-tooltip content="存为模板" placement="top">
                                                <span class="icon_btn" @click.stop="saveModel(item,index,5)"><img src="../../assets/img/ys_icon1.svg" alt=""></span>
                                            </el-tooltip>
                                            <el-tooltip content="删除" placement="top">
                                                <span class="icon_btn" @click.stop="deletIndustryClass(index)"><img src="../../assets/img/ys_icon2.svg" alt=""></span>
                                            </el-tooltip>
                                        </div>
                                    </div>
                                </div>
                                <div class="yusuan_btn flexbox flexbetween">
                                    <el-button size="mini" style="width:222px" @click="addIndustryClass">添加创意分类</el-button>
                                    <el-button size="mini" style="width:222px" @click="industryModel">选择模板</el-button>
                                </div>
                                <div slot="reference" class="select_box flexbox flexcenter flexbetween">
                                    <span class="select_text">{{createform.industryClass.model_name}}</span>
                                    <span class="el-icon-caret-bottom"></span>
                                </div>
                            </el-popover>
                            <div class="yusuan_num" style="font-size:14px;margin-left:16px">创意分类：{{createform.industry_list.length}} /10</div>
                        </div>
                    </el-form-item>
                    <el-form-item label="创意分类" :prop="`industryClass.industryValue`">
                        <el-cascader @change="seletCreatClass" v-model="createform.industryClass.industryValue" :options="industryList" :key="industryKey" ref="industryRef" :props="{label:'industry_name',value:'industry_id',}" style="width:318px"></el-cascader>
                    </el-form-item>
                    <el-form-item label="创意标签" :prop="`industryClass.ad_keywords`">
                        <div class="title_box">
                            <div class="flexbox flexcenter flexbetween">
                                <div class="flexbox flexcenter">
                                    <el-input v-model="industryName" placeholder="输入标签名称，回车确定" size="small" style="width:240px;margin-right:12px" maxlength="10" show-word-limit @keyup.enter.native="addIndustryTitle"></el-input>
                                    <el-button plain class="plain_blue" size="small" icon="el-icon-circle-plus-outline" @click="batchAddIndustry">批量添加</el-button>
                                    <el-button plain size="small" @click="clearIndustry">清空</el-button>
                                    <el-button type="primary" size="small" @click="isHotWordShow = !isHotWordShow">精选热词</el-button>
                                </div>
                                <span>已添加：{{createform.industryClass.ad_keywords.length}}/20</span>
                                <!-- <el-button type="primary" size="small" @click="isHotWordShow = !isHotWordShow">精选热词</el-button> -->
                            </div>
                            <div class="hot_word" v-if="isHotWordShow">
                                <div class="flexbox flexcenter flexjust word_search">
                                    <el-input placeholder="请输入您的商品关键词" v-model="hotWrodQuery" style="width:300px" size="small">
                                        <el-button slot="append" type="primary" size="small" icon="el-icon-search" @click="hotWrodSearch"></el-button>
                                    </el-input>
                                    <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg" @click="isHotWordShow = false" class="close_word">
                                        <path d="M11.0503 11.0503L20.9498 20.9498" stroke="#B4B7BD" stroke-width="2" stroke-linecap="round" />
                                        <path d="M11.0503 20.9497L20.9498 11.0502" stroke="#B4B7BD" stroke-width="2" stroke-linecap="round" />
                                    </svg>

                                </div>
                                <div class="hot_word_list flexbox" v-loading="hotWrod_loadding" element-loading-spinner="el-icon-loading" element-loading-background="rgba(255, 255, 255, 0.2)">
                                    <span class="hot_word_item" v-for="item in hotWordList" :key="item.word" @click="addHotWord(item)">{{item.word}}</span>
                                </div>
                            </div>
                            <div class="label_box flexbox">
                                <div class="label_item flexbox flexcenter flexbetween" v-for="(item,index) in createform.industryClass.ad_keywords" :key="index">
                                    <span>{{item}}</span>
                                    <img src="../../assets/img/close_label.svg" alt="" @click="deletIndustryTitle(index)">
                                </div>
                            </div>
                        </div>
                    </el-form-item>
                </div>

                <!-- 计划名称 -->
                <div class="com_box pd_20 mt_12">
                    <div class="market_title">计划名称</div>
                    <el-form-item label="计划名称" prop="name" :rules="createRules.checkPlan">
                        <el-popover placement="bottom" width="624" trigger="click">
                            <div class="flexbox flexcenter flexbetween">
                                <div class="flexbox">
                                    <span>插入动态词包：</span>
                                    <div class="flex flexbox" style="flex-wrap: wrap;">
                                        <div v-for="(item,index) in planKeyWord" :key="index">
                                            <el-link v-if="hideCreatTitle(item)" :underline="false" class="ml_12" type="primary" :disabled="getPlanNameStatus(item)" @click="addPlanKeyWord(item)">+{{item.name}}</el-link>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <el-input slot="reference" v-model="createform.name" clearable placeholder="请输入计划名称，1-50个字符" size="small" style="width:650px" @change="sessionSave"></el-input>
                        </el-popover>
                        <div class="flexbox" style="margin-top:5px">
                            <span class="font_14 color_02">预览示例：{{getPlanNameExple()}}</span>
                        </div>
                    </el-form-item>

                    <el-form-item label="生成方式" prop="type" :rules="{required: true, message: '请选择生成方式', trigger: ['blur', 'change']}">
                        <el-radio-group v-model="createform.type" size="small" @change="sessionSave">
                            <el-radio-button :label="1">智能计划</el-radio-button>
                            <el-radio-button :label="2">全量计划</el-radio-button>
                        </el-radio-group>
                    </el-form-item>
                </div>
            </el-form>
        </div>
        <div class="create_footer com_box" style="margin-top:12px">
            <el-button plain class="el-button-width plain_red" size="small" @click="cancelCreation">取消创建</el-button>
            <el-button plain class="el-button-width" size="small" @click="preStep">上一步</el-button>
            <el-button type="primary" class="el-button-width" size="small" @click="submitForm('createform')">下一步</el-button>
        </div>
    </div>
</template>

<script>
import BudgetModel from "./BudgetModel";
import AddBulkBid from "./AddBulkBid";
import AudienceModel from "./AudienceModel";
import TimeSlot from "./TimeSlot";
import SaveModelName from "./SaveModelName";
import AddMateri from "./AddMateri";
import EditMateri from "./EditMateri";
import AddPicture from "./AddPicture";
import EditPicture from "./EditPicture";
import EditCardInfo from "./EditCardInfo";
import AddMoreWord from "./AddMoreWord";
import BatchAddIndustry from "./BatchAddIndustry";
import IndustryModel from "./IndustryModel";
import CreatTitleModel from "./CreatTitleModel";
import BatchAddTitle from "./BatchAddTitle";
import BatchAddCreatTitle from "./BatchAddCreatTitle";
import citysOptions from "../../assets/js/citys2";
import countyOptions from "../../assets/js/county2";

export default {
    props: ["dataForm"],
    name: "",
    data() {
        var checkBudget = (rule, value, callback) => {
            let reg =
                /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
            if (!reg.test(value)) {
                return callback(
                    new Error("预算不少于300元，不超过9999999元，请正确输入")
                );
            } else if (value < 300 || value > 9999999) {
                return callback(
                    new Error("预算不少于300元，不超过9999999元，请正确输入")
                );
            } else if (
                this.createform.delivery.budget_mode == "BUDGET_MODE_TOTAL"
            ) {
                let date_time = this.createform.delivery.delivery_time;
                if (date_time.length > 0) {
                    let s1 = date_time[0];
                    let s2 = date_time[1];
                    s1 = new Date(s1.replace(/-/g, "/"));
                    s2 = new Date(s2.replace(/-/g, "/"));
                    let days = s2.getTime() - s1.getTime();
                    let time = parseInt(days / (1000 * 60 * 60 * 24)) + 1;

                    if (value < time * 100) {
                        return callback(new Error("预算不少于投放天数*100元"));
                    } else {
                        callback();
                    }
                } else {
                    callback();
                }
            } else {
                callback();
            }
        };
        var checkCpabid = (rule, value, callback) => {
            let reg =
                /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
            if (!reg.test(value)) {
                return callback(new Error("出价不少于0.1元，不超过10000元"));
            } else if (value < 0.1 || value > 10000) {
                return callback(new Error("出价不少于0.1元，不超过10000元"));
            } else if (
                Number(value) > Number(this.createform.delivery.budget)
            ) {
                return callback(new Error("出价不得高于预算"));
            } else {
                callback();
            }
        };

        var checkRoi = (rule, value, callback) => {
            let reg =
                /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
            if (!reg.test(value)) {
                return callback(new Error("不少于0.01元，不超过100元"));
            } else if (value < 0.01 || value > 100) {
                return callback(new Error("不少于0.01元，不超过100元"));
            } else {
                callback();
            }
        };

        var checkArea = (rule, value, callback) => {
            if (this.createform.audience.cityHasCheck.length > 200) {
                return callback(new Error("地域不能超过200个"));
            } else {
                callback();
            }
        };

        var checkTitok = (rule, value, callback) => {
            if (value.length > 30) {
                return callback(new Error("抖音达人不能超过30个"));
            } else {
                callback();
            }
        };

        var checkAction = (rule, value, callback) => {
            if (value.length > 350) {
                return callback(new Error("行为意向不能超过350个"));
            } else {
                callback();
            }
        };

        var checkInterest = (rule, value, callback) => {
            if (value.length > 350) {
                return callback(new Error("兴趣意向不能超过350个"));
            } else {
                callback();
            }
        };

        var checkTitleValue = (rule, value, callback) => {
            // let ref2 = /(?<=\{)(.+?)(?=\})/g;
            let wordList = this.keyWordList;
            let arr = [];
            let arrAll = [];
            let ref2 = /\{(.+?)\}/g; //获取花括号里面的内容-全局
            let ref = /\{(.+?)\}/; //获取花括号里面的内容
            let con = value.replace(/[^\{^\}]/g, "");
            let left = [];
            let right = [];
            let str = value.match(ref2);
            for (let i in con) {
                if (con[i] === "{") {
                    left.push(con[i]);
                } else {
                    right.push(con[i]);
                }
            }
            for (let i in str) {
                let text = str[i].match(ref);
                arrAll.push(text[1]);
            }
            for (let i in arrAll) {
                for (let a in wordList) {
                    if (arrAll[i] == wordList[a].name) {
                        arr.push({
                            word_id: wordList[a].creative_word_id,
                            dict_name: wordList[a].name,
                            default_word: wordList[a].default_word,
                        });
                    }
                }
            }
            let flag = arrAll.every((a) => {
                return wordList.some((b) => a == b.name);
            });
            let flag2 = left.length == right.length;
            if (!flag) {
                return callback(new Error("输入的动态词包不存在"));
            } else if (!flag2) {
                return callback(new Error("标题不允许带有{的符号"));
            } else if (arr.length > 2) {
                return callback(new Error("最多只能插入2个创意包"));
            } else {
                callback();
            }
        };

        var checkPlanValue = (rule, value, callback) => {
            // let ref2 = /(?<=\{)(.+?)(?=\})/g;
            let wordList = this.planKeyWord;
            let arr = [];
            let arrAll = [];
            let ref2 = /\{(.+?)\}/g; //获取花括号里面的内容-全局
            let ref = /\{(.+?)\}/; //获取花括号里面的内容
            let con = value.replace(/[^\{^\}]/g, "");
            let left = [];
            let right = [];
            let str = value.match(ref2);
            for (let i in con) {
                if (con[i] === "{") {
                    left.push(con[i]);
                } else {
                    right.push(con[i]);
                }
            }
            for (let i in str) {
                let text = str[i].match(ref);
                arrAll.push(text[1]);
            }
            for (let i in arrAll) {
                for (let a in wordList) {
                    if (arrAll[i] == wordList[a].name) {
                        arr.push({
                            word_id: wordList[a].creative_word_id,
                            dict_name: wordList[a].name,
                            default_word: wordList[a].default_word,
                        });
                    }
                }
            }
            let flag = arrAll.every((a) => {
                return wordList.some((b) => a == b.name);
            });
            let flag2 = left.length == right.length;
            if (!flag) {
                return callback(new Error("输入的动态词包不存在"));
            } else if (!flag2) {
                return callback(new Error("不允许带有{的符号"));
            } else {
                callback();
            }
        };
        return {
            blurIndex: null,
            planKeyWord: [],
            cityData: [],
            citysList: [],
            countryList: [],
            pickerOptions: {
                disabledDate(time) {
                    return time.getTime() < Date.now() - 8.64e7; //如果没有后面的-8.64e7就是不可以选择今天的
                },
            },
            value: "",
            titokResh: 0, //重置达人key
            industryKey: 100, //重置创意分类key
            cityOptions: [], //城市列表
            countyOptions: [], //区县列表
            keyWordFour: [], //创意词包
            keyWordList: [], //更多创意词包
            industryList: [], //创意分类
            industryName: "", //创意标签
            hotWordList: [], //精选热词列表
            hotWrodQuery: "", //精选热词搜索
            crowdQuery: "", //自定义人群包搜索
            isHotWordShow: false,
            hotWrod_loadding: false,
            titok_loadding: false,
            talent_loadding: false,
            pt_loadding: false,
            zdy_loadding: false,
            als_loadding: false,
            aky_loadding: false,
            ils_loadding: false,
            iky_loadding: false,
            behaviorsList: [
                {
                    id: "FOLLOWED_USER",
                    name: "关注",
                },
                {
                    id: "COMMENTED_USER",
                    name: "评论",
                },
                {
                    id: "LIKED_USER",
                    name: "点赞",
                },
                {
                    id: "SHARED_USER",
                    name: "分享",
                },
                {
                    id: "LIVE_WATCH",
                    name: "观看",
                },
                {
                    id: "LIVE_EFFECTIVE_WATCH",
                    name: "有效观看",
                },
                {
                    id: "LIVE_COMMENT",
                    name: "直播评论",
                },
                {
                    id: "LIVE_EXCEPTIONAL",
                    name: "打赏",
                },
                {
                    id: "LIVE_GOODS_CLICK",
                    name: "商品点击",
                },
                {
                    id: "LIVE_GOODS_ORDER",
                    name: "商品下单",
                },
                {
                    id: "GOODS_CARTS_CLICK",
                    name: "购物车点击",
                },
                {
                    id: "GOODS_CARTS_ORDER",
                    name: "购物车下单",
                },
            ],
            behaviorsDays: [
                {
                    id: "",
                    name: "无",
                },
                {
                    id: "DAYS_15",
                    name: "近15天",
                },
                {
                    id: "DAYS_30",
                    name: "近30天",
                },
                {
                    id: "DAYS_60",
                    name: "近60天",
                },
            ],
            extendList: [
                {
                    id: "REGION",
                    name: "地域",
                },
                {
                    id: "GENDER",
                    name: "性别",
                },
                {
                    id: "AGE",
                    name: "年龄",
                },
                {
                    id: "INTEREST_ACTION",
                    name: "行为兴趣",
                },
                {
                    id: "CUSTOM_AUDIENCE",
                    name: "更多人群-自定义人群",
                },
            ],
            actionList: [
                {
                    id: "E-COMMERCE",
                    name: "电商互动行为",
                },
                {
                    id: "NEWS",
                    name: "资讯互动行为",
                },
                {
                    id: "APP",
                    name: "APP推广互动行为",
                },
            ],
            actionDay: [
                {
                    id: "7",
                    label: "7天",
                },
                {
                    id: "15",
                    label: "15天",
                },
                {
                    id: "30",
                    label: "30天",
                },
                {
                    id: "60",
                    label: "60天",
                },
                {
                    id: "90",
                    label: "90天",
                },
                {
                    id: "180",
                    label: "180天",
                },
                {
                    id: "365",
                    label: "365天",
                },
            ],
            radio15: "1",
            createform: {
                external_action: "", //转化目标
                creative_material_mode: "CUSTOM_CREATIVE", //创意类型
                creative_way: "LIVE", //创意形式
                creative_auto_generate: 1, //是否生成更多创意
                is_homepage_hide: 1, //抖音主页是否隐藏视频
                deep_external_action: "", //深度转化目标
                roi_goal: "", //支付ROI目标
                deep_bid_type: "MIN", //深度出价方式
                type: "", //生产方式
                queuename: "",
                //预算列表
                budget_list: [
                    {
                        model_name: "用户出价1",
                        smart_bid_type: "SMART_BID_CUSTOM",
                        cost_control: false,
                        flow_control_mode: "FLOW_CONTROL_MODE_FAST",
                        budget_mode: "BUDGET_MODE_DAY",
                        budget: "300",
                        cpa_bid: "300",
                        schedule_fixed_range: "2",
                        video_schedule_type: "SCHEDULE_FROM_NOW",
                        delivery_time: [],
                        start_time: "",
                        end_time: "",
                        launch_period: "1",
                        schedule_time_value: "",
                        // schedule_time: {
                        //     timeContent: [],
                        //     timeSection: [],
                        //     timeStr: [],
                        //     rowUnit: [],
                        //     timeValue: [],
                        // },
                    },
                ],
                budget_active: 0,
                //预算和出价
                delivery: {
                    model_name: "",
                    smart_bid_type: "SMART_BID_CUSTOM", //投放方式
                    cost_control: false, //成本控制
                    flow_control_mode: "FLOW_CONTROL_MODE_FAST", //投放速度
                    budget_mode: "BUDGET_MODE_DAY", //预算类型
                    budget: "300", //预算
                    cpa_bid: "300", //出价
                    schedule_fixed_range: "2", //固定时长
                    video_schedule_type: "SCHEDULE_FROM_NOW", //投放日期
                    delivery_time: [], //开始结束日期
                    start_time: "", //开始时间
                    end_time: "", //结束时间
                    launch_period: "1", //投放时段
                    schedule_time_value: "",
                    // schedule_time: {
                    //     timeContent: [],
                    //     timeSection: [],
                    //     timeStr: [],
                    //     rowUnit: [],
                    //     timeValue: [],
                    // },
                },

                // 定向人群列表
                audience_list: [
                    {
                        model_name: "定向人群1",
                        audience_mode: "AUTO", //智能推荐
                        isAllCity: false, //城市是否全选
                        district: "NONE", //城市
                        location_type: "CURRENT",
                        cityVal: [], //已选城市
                        cityHasCheck: [],
                        cityAllValue: [], //地域提交值
                        gender: "NONE", //性别
                        age: [], //年龄
                        awemeRadio: "1", //抖音达人切换
                        recomentRadio: "CLASS", //抖音达人切换
                        aweme_fan_behaviors: ["FOLLOWED_USER"], //已选抖音用户行为类型
                        aweme_fan_behaviors_days: "", //抖音达人互动用户行为天数
                        category_id: "", //推荐达人ID
                        category_text: "", //推荐名称
                        titokQuery: "", //抖音达人搜索
                        tiktokTypeOption: [], //达人分类列表
                        tiktokTypeCheck: [], //已选达人分类
                        tiktokTypeVal: [], //已选达人分类绑定值
                        titokTalentList: [], //抖音达人列表
                        titokTalentVal: [], //抖音达人绑定值ID
                        titokTalentText: [], //抖音达人显示值
                        tiktokAllCheck: [], //抖音达人总选
                        back_id: "", //返回达人ID
                        back_text: "", //返回达人名称
                        crowdRadio: "1", //更多人群切换
                        crowdTab: "1",
                        crowdDrop: "ALL",
                        plartformCrow: [], //平台精选人群列表
                        customCrow: [], //自定义人群列表
                        plartformVal: [], //平台精选人群绑定值
                        plartformText: [], //已选平台精选人群
                        customCrowdText: [], //已选自定义人群
                        allCrowdCheck: [], //人群总选
                        auto_extend_enabled: 0, //是否开启智能投放
                        auto_extend_targets: [], //已选智能投放绑定值
                        auto_extend_text: [], //已选智能投放列表
                        smart_interest_action: "", //行为兴趣类型
                        action_scene: ["E-COMMERCE", "NEWS", "APP"], //行为场景
                        actionTab: "1",
                        interestTab: "1",
                        action_days: "30", //行为天数
                        actionList: [], //行为类目列表
                        action_val: [], //行为类目绑定值
                        action_text: [], //行为类目已选值
                        action_key_list: [], //行为类目关键词列表
                        action_key_text: [], //行为类目已选关键词
                        actionAllCheck: [], //行为类目词总选值
                        actionKeyText: "", //已选行为类目
                        interestList: [], //兴趣类目列表
                        interest_val: [], //兴趣类目绑定值
                        interest_text: [], //兴趣类目已选值
                        interest_key_list: [], //兴趣关键词列表
                        interest_key_text: [], //兴趣已选关键词
                        interestAllCheck: [], //兴趣总选值
                        interestKeyText: "", //已选兴趣类目
                        age_null: "1",
                        ac: [], //网络
                        ac_null: "1",
                        platform: "", //平台
                        exclude_limited_region:0,//排除限定地区
                        new_customer:'NONE',//新客定向
                    },
                ],

                audience_active: 0,
                // 定向人群数据
                audience: {
                    model_name: "",
                    audience_mode: "AUTO", //智能推荐
                    isAllCity: false, //城市是否全选
                    district: "NONE", //城市
                    location_type: "CURRENT",
                    cityVal: [], //已选城市
                    cityHasCheck: [],
                    cityAllValue: [], //地域提交值
                    gender: "NONE", //性别
                    age: [], //年龄
                    awemeRadio: "1", //抖音达人切换
                    recomentRadio: "CLASS", //抖音达人切换
                    aweme_fan_behaviors: ["FOLLOWED_USER"], //已选抖音用户行为类型
                    aweme_fan_behaviors_days: "", //抖音达人互动用户行为天数
                    category_id: "", //推荐达人ID
                    category_text: "", //推荐名称
                    titokQuery: "", //抖音达人搜索
                    tiktokTypeOption: [], //达人分类列表
                    tiktokTypeCheck: [], //已选达人分类
                    tiktokTypeVal: [], //已选达人分类绑定值
                    titokTalentList: [], //抖音达人列表
                    titokTalentVal: [], //抖音达人绑定值ID
                    titokTalentText: [], //抖音达人显示值
                    tiktokAllCheck: [], //抖音达人总选
                    back_id: "", //返回达人ID
                    back_text: "", //返回达人名称
                    crowdRadio: "1", //更多人群切换
                    crowdTab: "1",
                    crowdDrop: "ALL",
                    plartformCrow: [], //平台精选人群列表
                    customCrow: [], //自定义人群列表
                    plartformVal: [], //平台精选人群绑定值
                    plartformText: [], //已选平台精选人群
                    customCrowdText: [], //已选自定义人群
                    allCrowdCheck: [], //人群总选
                    auto_extend_enabled: 0, //是否开启智能投放
                    auto_extend_targets: [], //已选智能投放绑定值
                    auto_extend_text: [], //已选智能投放列表
                    smart_interest_action: "", //行为兴趣类型
                    action_scene: ["E-COMMERCE", "NEWS", "APP"], //行为场景
                    actionTab: "1",
                    interestTab: "1",
                    action_days: "30", //行为天数
                    actionList: [], //行为类目列表
                    action_val: [], //行为类目绑定值
                    action_text: [], //行为类目已选值
                    action_key_list: [], //行为类目关键词列表
                    action_key_text: [], //行为类目已选关键词
                    actionAllCheck: [], //行为类目词总选值
                    actionKeyText: "", //已选行为类目
                    interestList: [], //兴趣类目列表
                    interest_val: [], //兴趣类目绑定值
                    interest_text: [], //兴趣类目已选值
                    interest_key_list: [], //兴趣关键词列表
                    interest_key_text: [], //兴趣已选关键词
                    interestAllCheck: [], //兴趣总选值
                    interestKeyText: "", //已选兴趣类目
                    age_null: "1",
                    ac: [], //网络
                    ac_null: "1",
                    platform: "", //平台
                    exclude_limited_region:0,//排除限定地区
                    new_customer:'NONE',//新客定向
                },

                creatinfo_active: 0,
                creatinfo_list: [
                    {
                        model_name: "创意组1",
                        creative: [],
                    },
                ],
                // 制作创意
                creatinfo: {
                    model_name: "",
                    creative: [],
                },

                creattitle_active: 0,
                creattitle_list: [
                    {
                        model_name: "标题组1",
                        title: [
                            {
                                title: "",
                                dynamic_words: [],
                            },
                        ],
                    },
                ],
                // 创意标题
                creattitle: {
                    model_name: "",
                    title: [
                        {
                            title: "",
                            dynamic_words: [],
                        },
                    ],
                },

                // 卡片
                card: {
                    car_img: null,
                    car_name: "视频同款商品",
                    car_tag: ["商家倾情推荐"],
                    car_link: "查看详情",
                    is_fisrtchoid: 1,
                    picture_name: "",
                },

                // 创意分类
                industry_active: 0,
                industry_list: [
                    {
                        model_name: "创意分类1",
                        industryValue: [],
                        ad_keywords: [],
                        first_industry_id: "",
                        second_industry_id: "",
                        third_industry_id: "",
                    },
                ],
                industryClass: {
                    model_name: "创意分类1",
                    industryValue: [],
                    ad_keywords: [],
                    first_industry_id: "",
                    second_industry_id: "",
                    third_industry_id: "",
                },

                // 计划名称
                name: "",
                exp_name: "",
            },

            createRules: {
                checkTitle: [
                    {
                        required: true,
                        message: "请输入",
                        trigger: ["blur", "change"],
                    },
                    {
                        min: 5,
                        max: 55,
                        message: "长度在 5 到 55 个字符",
                        trigger: ["blur", "change"],
                    },
                    { validator: checkTitleValue, trigger: ["blur", "change"] },
                ],
                checkRoi: [
                    { validator: checkRoi, trigger: ["blur", "change"] },
                ],
                "delivery.budget": [
                    { validator: checkBudget, trigger: ["blur", "change"] },
                ],
                "delivery.cpa_bid": [
                    { validator: checkCpabid, trigger: ["blur", "change"] },
                ],
                "audience.cityVal": [
                    {
                        required: true,
                        message: "请选择地域",
                        trigger: ["blur", "change"],
                    },
                    { validator: checkArea, trigger: ["blur", "change"] },
                ],
                "audience.tiktokAllCheck": [
                    {
                        required: true,
                        message: "请选择抖音达人",
                        trigger: ["blur", "change"],
                    },
                    { validator: checkTitok, trigger: ["blur", "change"] },
                ],
                "audience.allCrowdCheck": [
                    {
                        required: true,
                        message: "请选择人群",
                        trigger: ["blur", "change"],
                    },
                ],
                "audience.auto_extend_text": [
                    {
                        required: true,
                        message: "请选择智能投放",
                        trigger: ["blur", "change"],
                    },
                ],
                "audience.actionAllCheck": [
                    {
                        required: true,
                        message: "请选择行为意向",
                        trigger: ["blur", "change"],
                    },
                    { validator: checkAction, trigger: ["blur", "change"] },
                ],
                "audience.interestAllCheck": [
                    {
                        required: true,
                        message: "请选择兴趣意向",
                        trigger: ["blur", "change"],
                    },
                    { validator: checkInterest, trigger: ["blur", "change"] },
                ],
                "creatinfo.creative": [
                    {
                        required: true,
                        message: "请添加创意内容",
                        trigger: ["blur", "change"],
                    },
                ],
                "industryClass.industryValue": [
                    {
                        required: false,
                        message: "请选择创意分类",
                        trigger: ["blur", "change"],
                    },
                ],
                "industryClass.ad_keywords": [
                    {
                        required: false,
                        message: "请选择创意标签",
                        trigger: ["blur", "change"],
                    },
                ],
                checkPlan: [
                    {
                        required: true,
                        message: "请输入",
                        trigger: ["blur", "change"],
                    },
                    { validator: checkPlanValue, trigger: ["blur", "change"] },
                ],
            },
        };
    },
    created() {
        // this.cityData = citysData
        // this.getCityDatas()
        // this.getCountryData()
        this.cityOptions = citysOptions;
        this.countyOptions = countyOptions;
        this.createform = this.dataForm.createform;
        this.createform.delivery =
            this.createform.budget_list[this.createform.budget_active];
        this.createform.audience =
            this.createform.audience_list[this.createform.audience_active];
        this.createform.industryClass =
            this.createform.industry_list[this.createform.industry_active];
        this.createform.creatinfo =
            this.createform.creatinfo_list[this.createform.creatinfo_active];
        this.createform.creattitle =
            this.createform.creattitle_list[this.createform.creattitle_active];
        this.dataForm.createform.card.car_img = this.dataForm.createform.card
            .car_img
            ? this.dataForm.createform.card.car_img
            : this.dataForm.tableData[0].hasShop.img;
        this.dataForm.createform.card.picture_name = this.dataForm.createform
            .card.picture_name
            ? this.dataForm.createform.card.picture_name
            : this.dataForm.tableData[0].hasShop.product_name +
              "_" +
              this.dataForm.tableData[0].hasShop.product_id;
        this.dataForm.createform.card.picture_name = this.dataForm.createform
            .card.picture_name
            ? this.dataForm.createform.card.picture_name
            : this.dataForm.tableData[0].hasShop.product_name +
              "_" +
              this.dataForm.tableData[0].hasShop.product_id;

        this.getAwemecategory();
        this.getPlamCrow();
        this.getCustomCrow();
        this.getActionList();
        this.getInterestList();
        this.getKeyWord();
        this.getIndustryList();
        if (this.createform.audience.category_id) {
            this.getRecommendedTalent();
        }
        if (this.createform.audience.titokQuery) {
            this.remoteMethodTitok();
        }
        if (this.createform.audience.actionKeyText) {
            this.getActionKey();
        }
        if (this.createform.audience.interestKeyText) {
            this.getInterestKey();
        }
        this.planKeyWord = [
            {
                name: "日期",
                default_name: this.getCurrentDate(),
                key: "{日期}",
                disabled: false,
            },
            {
                name: "投放方式",
                default_name:
                    this.createform.delivery.smart_bid_type ==
                    "SMART_BID_CUSTOM"
                        ? "控制成本投放"
                        : "放量投放",
                key: "{投放方式}",
                disabled: false,
            },
            {
                name: "转化目标",
                default_name: this.getExternalText(),
                key: "{转化目标}",
                disabled: false,
            },
            {
                name: "预算包名",
                default_name: this.createform.delivery.model_name,
                key: "{预算包名}",
                disabled: false,
            },
            {
                name: "定向包名",
                default_name: this.createform.audience.model_name,
                key: "{定向包名}",
                disabled: false,
            },
            {
                name: "创意分类包名",
                default_name: this.createform.industryClass.model_name,
                key: "{创意分类包名}",
                disabled: false,
            },
            {
                name: "创意组包名",
                default_name: this.createform.creatinfo.model_name,
                key: "{创意组包名}",
                disabled: false,
            },
            {
                name: "标题组包名",
                default_name: this.createform.creattitle.model_name,
                key: "{标题组包名}",
                disabled: false,
            },
        ];
    },
    computed: {
        // 省市所有默认值
        cascaderCityData() {
            var model = [];
            function tree2arr(arr, str, level) {
                arr.forEach((it) => {
                    let newStr = str.length ? [...str, it.value] : [it.value];
                    if (it.children) {
                        tree2arr(it.children, newStr, level + 1);
                    } else {
                        model.push(newStr);
                    }
                });
            }
            tree2arr(this.cityOptions, [], 0);
            return model;
        },

        // 区县所有默认值
        cascaderCountyData() {
            var model = [];
            function tree2arr(arr, str, level) {
                arr.forEach((it) => {
                    let newStr = str.length ? [...str, it.value] : [it.value];
                    if (it.children) {
                        tree2arr(it.children, newStr, level + 1);
                    } else {
                        model.push(newStr);
                    }
                });
            }
            tree2arr(this.countyOptions, [], 0);
            return model;
        },

        // 智能计划取最大值
        maxLength() {
            let arr = [];
            if (this.dataForm.createform.type == 1) {
                if (
                    this.dataForm.market == "VIDEO_PROM_GOODS" ||
                    this.dataForm.createform.creative_way == "VIDEO"
                ) {
                    if (
                        this.dataForm.createform.creative_material_mode ==
                        "CUSTOM_CREATIVE"
                    ) {
                        arr = [
                            this.dataForm.createform.budget_list.length,
                            this.dataForm.createform.audience_list.length,
                            this.dataForm.createform.industry_list.length,
                        ];
                    } else {
                        arr = [
                            this.dataForm.createform.budget_list.length,
                            this.dataForm.createform.audience_list.length,
                            this.dataForm.createform.industry_list.length,
                            this.dataForm.createform.creattitle_list.length,
                        ];
                    }
                } else {
                     if (
                        this.dataForm.createform.creative_material_mode ==
                        "CUSTOM_CREATIVE"
                    ) {
                        arr = [
                            this.dataForm.createform.budget_list.length,
                            this.dataForm.createform.audience_list.length,
                            this.dataForm.createform.industry_list.length,
                        ];
                    } else {
                        arr = [
                            this.dataForm.createform.budget_list.length,
                            this.dataForm.createform.audience_list.length,
                            this.dataForm.createform.industry_list.length,
                            this.dataForm.createform.creattitle_list.length,
                        ];
                    }
                }
            }
            return Math.max(...arr);
        },

        // 智能计划取最大值
        allLength() {
            let arr = 0;
            let tb_num = this.dataForm.tableData.length
            let bd_num = this.dataForm.createform.budget_list.length
            let ad_num = this.dataForm.createform.audience_list.length
            let in_num = this.dataForm.createform.industry_list.length
            let cy_num = this.dataForm.createform.creatinfo_list.length
            let tt_num = this.dataForm.createform.creattitle_list.length
            if(this.dataForm.market=='VIDEO_PROM_GOODS' || this.dataForm.createform.creative_way=='VIDEO'){
                if(this.dataForm.createform.creative_material_mode=='CUSTOM_CREATIVE'){
                    arr = tb_num*bd_num*ad_num*in_num*cy_num
                }else if(this.dataForm.createform.creative_material_mode=='PROGRAMMATIC_CREATIVE'){
                    arr = tb_num*bd_num*ad_num*in_num*cy_num*tt_num
                }
            }else{
                if(this.dataForm.createform.creative_material_mode=='CUSTOM_CREATIVE'){
                    arr = tb_num*bd_num*ad_num*in_num*cy_num
                }else if(this.dataForm.createform.creative_material_mode=='PROGRAMMATIC_CREATIVE'){
                    if(this.dataForm.createform.creative_way.includes('VIDEO')){
                        arr = tb_num*bd_num*ad_num*in_num*cy_num*tt_num
                    }else{
                        arr = tb_num*bd_num*ad_num*in_num*tt_num
                    }
                    
                }
            }
            return arr
        },
    },
    methods: {
        // getCityDatas(){
        //     let first = []
        //     for(let i in this.cityData){
        //         if(this.cityData[i].level==1){
        //             first.push({
        //                 value:this.cityData[i].id,
        //                 level:this.cityData[i].level,
        //                 children:this.cityData[i].children,
        //                 parent:this.cityData[i].parent,
        //                 label:this.cityData[i].name,
        //             })
        //         }
        //     }
        //     first.forEach((item)=>{
        //         item.children = []
        //         for(let i in this.cityData){
        //             if(this.cityData[i].level==2 && item.value==this.cityData[i].parent){
        //                 item.children.push({
        //                     value:this.cityData[i].id,
        //                     level:this.cityData[i].level,
        //                     parent:this.cityData[i].parent,
        //                     label:this.cityData[i].name,
        //                 })
        //             }
        //         }
        //     })
        //     for(let i in first){
        //         delete first[i].level
        //         delete first[i].parent
        //         first[i].value = first[i].value+''
        //         if(first[i].children){
        //             for(let a in first[i].children){
        //                 delete first[i].children[a].level
        //                 delete first[i].children[a].parent
        //                 first[i].children[a].value = first[i].children[a].value+''

        //             }
        //         }
        //     }
        // },

        // getCountryData(){
        //     let first = []
        //     for(let i in this.cityData){
        //         if(this.cityData[i].level==1){
        //             first.push({
        //                 value:this.cityData[i].id,
        //                 level:this.cityData[i].level,
        //                 children:this.cityData[i].children,
        //                 parent:this.cityData[i].parent,
        //                 label:this.cityData[i].name,
        //             })
        //         }
        //     }
        //     first.forEach((item)=>{
        //         item.children = []
        //         if(item.value==11||item.value==12||item.value==31||item.value==50||item.value==71||item.value==81||item.value==82){
        //             for(let i in this.cityData){
        //                 if(this.cityData[i].level==3 && item.value==this.cityData[i].parent){
        //                     item.children.push({
        //                         value:this.cityData[i].id,
        //                         level:this.cityData[i].level,
        //                         children:this.cityData[i].children,
        //                         parent:this.cityData[i].parent,
        //                         label:this.cityData[i].name,
        //                     })
        //                 }
        //             }
        //         }else{
        //             for(let i in this.cityData){
        //                 if(this.cityData[i].level==2 && item.value==this.cityData[i].parent){
        //                     item.children.push({
        //                         value:this.cityData[i].id,
        //                         level:this.cityData[i].level,
        //                         children:this.cityData[i].children,
        //                         parent:this.cityData[i].parent,
        //                         label:this.cityData[i].name,
        //                     })
        //                 }
        //             }
        //         }

        //     })
        //     first.forEach((item) => {
        //         item.children.forEach((a) => {
        //             a.children = [];
        //             for(let i in this.cityData){
        //                 if(this.cityData[i].level==3 && a.value==this.cityData[i].parent){
        //                     a.children.push({
        //                         value:this.cityData[i].id,
        //                         level:this.cityData[i].level,
        //                         children:this.cityData[i].children,
        //                         parent:this.cityData[i].parent,
        //                         label:this.cityData[i].name,
        //                     })
        //                 }
        //             }
        //         });
        //     });
        //     for(let i in first){
        //         delete first[i].level
        //         delete first[i].parent
        //         first[i].value = first[i].value+''
        //         if(first[i].children){
        //             for(let a in first[i].children){
        //                 delete first[i].children[a].level
        //                 delete first[i].children[a].parent
        //                 first[i].children[a].value = first[i].children[a].value+''
        //                 if(first[i].children[a].children){
        //                     for(let b in first[i].children[a].children){
        //                         delete first[i].children[a].children[b].level
        //                         delete first[i].children[a].children[b].parent
        //                         first[i].children[a].children[b].value = first[i].children[a].children[b].value+''
        //                     }
        //                 }
        //             }
        //         }
        //     }
        // },

        //选择投放设置
        changeExternal(v) {
            this.planKeyWord[2].default_name = this.getExternalText();
            if (v !== "AD_CONVERT_TYPE_SHOPPING" || v !== "AD_CONVERT_TYPE_LIVE_SUCCESSORDER_PAY") {
                this.createform.deep_external_action = "";
            }
            this.sessionSave();
        },

        // 选择支付ROI
        payRoi(v) {
            if (v == "AD_CONVERT_TYPE_LIVE_PAY_ROI") {
                this.createform.deep_bid_type = "MIN";
            }
            this.sessionSave();
        },

        // 选择预算模板
        budgetModel() {
            const attr = {
                dialogVsb: true,
            };
            this.$bus.emit("budgetModel", attr);
        },

        // 预算出价校验
        budgetCheck(index, callback) {
            let list = this.createform.budget_list;
            // let active = index;
            let reg =
                /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
            if (!reg.test(list[index].budget)) {
                this.$message.error("请正确输入预算");
                return;
            }
            if (
                Number(list[index].budget) < 300 ||
                Number(list[index].budget) > 9999999
            ) {
                this.$message.error("请正确输入预算");
                return;
            }
            if (list[index].smart_bid_type == "SMART_BID_CUSTOM") {
                if (!reg.test(list[index].cpa_bid)) {
                    this.$message.error("请正确输入出价");
                    return;
                } else if (
                    Number(list[index].cpa_bid) < 0.1 ||
                    Number(list[index].cpa_bid) > 10000
                ) {
                    this.$message.error("请正确输入出价");
                    return;
                }
            }

            if (Number(list[index].cpa_bid) > Number(list[index].budget)) {
                this.$message.error("出价不得高于预算");
                return;
            }
            if (list[index].video_schedule_type == "SCHEDULE_START_END") {
                if (list[index].delivery_time.length == 0) {
                    this.$message.error("用户出价投放开始和结束时间不能为空");
                    return;
                }
            }
            if (this.createform.delivery.budget_mode == "BUDGET_MODE_TOTAL") {
                let date_time = list[index].delivery_time;
                if (date_time.length > 0) {
                    let s1 = date_time[0];
                    let s2 = date_time[1];
                    s1 = new Date(s1.replace(/-/g, "/"));
                    s2 = new Date(s2.replace(/-/g, "/"));
                    let days = s2.getTime() - s1.getTime();
                    let time = parseInt(days / (1000 * 60 * 60 * 24)) + 1;

                    if (list[index].budget < time * 100) {
                        this.$message.error("预算不少于投放天数*100元");
                        return;
                    }
                }
            }
            callback();
        },

        // 定向人群校验
        ActionInterestCheck(index, callback) {
            let list = this.createform.audience_list;
            if (list[index].district !== "NONE") {
                if (list[index].cityVal.length == 0) {
                    this.$message.error("请选择地域");
                    return;
                }

                if (list[index].cityHasCheck.length >= 2000) {
                    this.$message.error("地域不能超过2000个");
                    return;
                }
            }

            if (list[index].awemeRadio == "2") {
                if (list[index].tiktokAllCheck.length == 0) {
                    this.$message.error("请选择抖音达人");
                    return;
                } else if (list[index].tiktokAllCheck.length > 30) {
                    this.$message.error("抖音达人不能超过30个");
                    return;
                }
            }

            if (list[index].crowdRadio == "2") {
                if (list[index].allCrowdCheck.length == 0) {
                    this.$message.error("请选择人群");
                    return;
                }
            }

            if (list[index].auto_extend_enabled == 1) {
                if (list[index].auto_extend_text.length == 0) {
                    this.$message.error("请选择智能放量");
                    return;
                }
            }

            if (list[index].smart_interest_action == "CUSTOM") {
                if (list[index].actionAllCheck.length == 0) {
                    this.$message.error("请选择行为意向");
                    return;
                } else if (list[index].actionAllCheck.length > 350) {
                    this.$message.error("行为意向不能超过30个");
                    return;
                }

                if (list[index].interestAllCheck.length == 0) {
                    this.$message.error("请选择兴趣意向");
                    return;
                } else if (list[index].interestAllCheck.length > 350) {
                    this.$message.error("兴趣意向不能超过30个");
                    return;
                }
            }

            callback();
        },

        // 制作创意校验
        creatCheck(index, callback) {
            let list = this.createform.creatinfo_list;

            if (
                this.createform.creative_material_mode ==
                "PROGRAMMATIC_CREATIVE"
            ) {
                if (list[index].creative.length == 0) {
                    this.$message.error("请添加创意内容！");
                    return;
                }
            }

            if (this.createform.creative_material_mode == "CUSTOM_CREATIVE") {
                if (list[index].creative.length == 0) {
                    this.$message.error("请添加创意内容！");
                    return;
                }

                for (let i in list[index].creative) {
                    if (!list[index].creative[i].title) {
                        this.$message.error("请输入创意标题！");
                        return;
                    }
                }
            }

            callback();
        },

        // 创意标题校验
        creattitleCheck(index, callback) {
            let list = this.createform.creattitle_list;

            for (let i in list[index].title) {
                if (!list[index].title[i].title) {
                    this.$message.error("请输入创意标题！");
                    return;
                }
            }
            callback();
        },

        // 创意分类校验
        industryCheck(index, callback) {
            let list = this.createform.industry_list;

            if (list[index].industryValue.length == 0) {
                this.$message.error("请选择创意分类！");
                return;
            }

            if (list[index].ad_keywords.length == 0) {
                this.$message.error("请添加创意标签！");
                return;
            }

            callback();
        },

        // 添加预算列表
        addBudget() {
            let that = this;
            let list = that.createform;
            if (list.budget_list.length > 9) {
                return;
            } else {
                this.budgetCheck(list.budget_active, function () {
                    let delivery = {
                        model_name: "用户出价" + (list.budget_list.length + 1),
                        smart_bid_type: "SMART_BID_CUSTOM",
                        cost_control: false,
                        flow_control_mode: "FLOW_CONTROL_MODE_FAST",
                        budget_mode: "BUDGET_MODE_DAY",
                        budget: "300",
                        cpa_bid: "300",
                        schedule_fixed_range: "2",
                        video_schedule_type: "SCHEDULE_FROM_NOW",
                        delivery_time: [],
                        start_time: "",
                        end_time: "",
                        launch_period: "1",
                        schedule_time_value: "",
                        // schedule_time: {
                        //     timeContent: [],
                        //     timeSection: [],
                        //     timeStr: [],
                        //     rowUnit: [],
                        //     timeValue: [],
                        // },
                    };
                    list.budget_list.push(delivery);
                    list.budget_active = list.budget_list.length - 1;
                    list.delivery = list.budget_list[list.budget_active];
                });
            }
            this.sessionSave();
        },

        // 计划托管
        managedSet(e){
            if(e=='LAB_AD'){
                this.createform.external_action = 'AD_CONVERT_TYPE_SHOPPING'
                this.createform.delivery.smart_bid_type = 'SMART_BID_CUSTOM'
                this.createform.delivery.cost_control = false
                this.createform.creative_material_mode = 'PROGRAMMATIC_CREATIVE'
                this.createform.delivery.flow_control_mode = 'FLOW_CONTROL_MODE_FAST'
                this.createform.delivery.budget_mode = 'BUDGET_MODE_DAY'
                this.createform.audience.awemeRadio = 1
                this.createform.audience.smart_interest_action = ''
                this.createform.deep_external_action = "";
            }
        },

        // 成本稳投
        managedSet2(e){
            if(e=='LAB_AD'){
                this.createform.external_action = 'AD_CONVERT_TYPE_LIVE_SUCCESSORDER_PAY'
                this.createform.delivery.smart_bid_type = 'SMART_BID_CUSTOM'
                this.createform.delivery.cost_control = false
                this.createform.creative_material_mode = 'PROGRAMMATIC_CREATIVE'
                this.createform.delivery.flow_control_mode = 'FLOW_CONTROL_MODE_FAST'
                this.createform.delivery.budget_mode = 'BUDGET_MODE_DAY'
                this.createform.audience.awemeRadio = 1
                this.createform.audience.smart_interest_action = 'RECOMMEND'
                this.createform.creative_way = ['LIVE']
                this.sessionSave();
            }else{
                this.createform.creative_material_mode = 'CUSTOM_CREATIVE'
                this.createform.creative_way = 'LIVE'
            }
        },

        // 投放方式
        changeSmartType() {
            if (
                this.createform.delivery.smart_bid_type ==
                "SMART_BID_CONSERVATIVE"
            ) {
                this.createform.delivery.budget_mode = "BUDGET_MODE_DAY";
                this.createform.delivery.cost_control = false;
                this.createform.deep_external_action = "";
            }
            let text =
                this.createform.delivery.smart_bid_type == "SMART_BID_CUSTOM"
                    ? "控制成本投放"
                    : "放量投放";
            this.changePlanKey(1, text);
            this.sessionSave();
        },

        // 严格控制成本
        changeCostControl(v) {
            if (v) {
                this.createform.deep_external_action = "";
            }
            this.sessionSave();
        },

        // 预算方式
        changeBudgetMode() {
            let mode = this.createform.delivery.budget_mode;
            if (mode == "BUDGET_MODE_TOTAL") {
                this.createform.delivery.video_schedule_type =
                    "SCHEDULE_START_END";
            }
            this.sessionSave();
        },

        //选择投放日期范围
        selectSeliverytime() {
            this.createform.delivery.start_time =
                this.createform.delivery.delivery_time[0];
            this.createform.delivery.end_time =
                this.createform.delivery.delivery_time[1];
            this.sessionSave();
        },

        //删除预算列表
        deletBudget(index) {
            let list = this.createform;
            if (this.createform.budget_list.length == 1) {
                return;
            } else {
                list.budget_list.splice(index, 1);
                list.budget_active = 0;
                list.delivery = list.budget_list[0];
                this.$bus.emit("timeModelData", this.createform);
            }
            this.sessionSave();
        },

        // 选择预算出价模板
        seletBudget(val, index) {
            let that = this;
            let list = that.createform;
            if (list.budget_list.length == 1) {
                list.budget_active = index;
                list.delivery = val;
            } else {
                this.budgetCheck(list.budget_active, function () {
                    list.budget_list[list.budget_active] = list.delivery;
                    list.budget_active = index;
                    list.delivery = val;
                    that.$bus.emit("timeModelData", that.createform);
                    that.changePlanKey(3, val.model_name);
                });
            }
            this.sessionSave();
        },

        // 批量出价
        addBulkBid() {
            let reg =
                /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
            if (!reg.test(this.createform.delivery.cpa_bid)) {
                this.$message.error("请正确输入出价");
                return;
            } else if (
                Number(this.createform.delivery.cpa_bid) < 0.1 ||
                Number(this.createform.delivery.cpa_bid) > 10000
            ) {
                this.$message.error("请正确输入出价");
                return;
            }

            if (
                Number(this.createform.delivery.cpa_bid) >
                Number(this.createform.delivery.budget)
            ) {
                this.$message.error("出价不得高于预算");
                return;
            }
            if (
                this.createform.delivery.video_schedule_type ==
                "SCHEDULE_START_END"
            ) {
                if (this.createform.delivery.delivery_time.length == 0) {
                    this.$message.error("用户出价投放开始和结束时间不能为空");
                    return;
                }
            }
            if (this.createform.budget_list.length == 10) {
                this.$message.error("已超出模板数量限制！");
                return;
            }
            const attr = {
                dialogVsb: true,
                number: 10 - this.createform.budget_list.length,
                info: this.createform.delivery,
            };
            this.$bus.emit("addBulkBid", attr);
        },

        //保存模板
        saveModel(item, index, type) {
            let that = this;
            if (type == 1) {
                this.budgetCheck(index, function () {
                    const attr = {
                        dialogVsb: true,
                        type: type,
                        content: item,
                    };
                    that.$bus.emit("saveModel", attr);
                });
            } else if (type == 2) {
                this.ActionInterestCheck(index, function () {
                    const attr = {
                        dialogVsb: true,
                        type: type,
                        content: item,
                    };
                    that.$bus.emit("saveModel", attr);
                });
            } else if (type == 4) {
                this.creattitleCheck(index, function () {
                    const attr = {
                        dialogVsb: true,
                        type: type,
                        content: item,
                    };
                    that.$bus.emit("saveModel", attr);
                });
            } else if (type == 5) {
                this.industryCheck(index, function () {
                    const attr = {
                        dialogVsb: true,
                        type: type,
                        content: item,
                    };
                    that.$bus.emit("saveModel", attr);
                });
            }
        },

        //年龄选择
        changeAgeNull() {
            this.createform.audience.age = [];
            this.sessionSave();
        },
        changeAgeHas() {
            if (this.createform.audience.age.length == 0) {
                this.createform.audience.age_null = "1";
            } else {
                this.createform.audience.age_null = "";
            }
            this.sessionSave();
        },

        //网络选择
        changeAcNull() {
            this.createform.audience.ac = [];
            this.sessionSave();
        },
        changeAcHas() {
            if (this.createform.audience.ac.length == 0) {
                this.createform.audience.ac_null = "1";
            } else {
                this.createform.audience.ac_null = "";
            }
            this.sessionSave();
        },

        // 城市全选
        cityAllCheck(v) {
            if (this.createform.audience.district == "CITY") {
                this.createform.audience.cityVal = v
                    ? this.cascaderCityData
                    : [];
            } else if (this.createform.audience.district == "COUNTY") {
                this.createform.audience.cityVal = v
                    ? this.cascaderCountyData
                    : [];
            }
            this.$nextTick(() => {
                let childNodes = this.$refs.citys
                    .getCheckedNodes(true)
                    .map((it) => {
                        return it.value;
                    });
                this.createform.audience.cityAllValue = childNodes;
                let checkText = [];
                let CheckedNodes = this.$refs.citys.getCheckedNodes();
                CheckedNodes = CheckedNodes.filter(
                    (option) => !(option.parent && option.parent.checked)
                );
                for (let i in CheckedNodes) {
                    checkText.push({
                        label: CheckedNodes[i].label,
                        value: CheckedNodes[i].value,
                    });
                }
                this.createform.audience.cityHasCheck = checkText;
                this.sessionSave();
            });
            this.sessionSave();
        },

        // 城市选择
        getCityVal(v) {
            if (this.createform.audience.district == "CITY") {
                this.cascaderCityData.length == v.length
                    ? (this.createform.audience.isAllCity = true)
                    : (this.createform.audience.isAllCity = false);
            } else if (this.createform.audience.district == "COUNTY") {
                this.cascaderCountyData.length == v.length
                    ? (this.createform.audience.isAllCity = true)
                    : (this.createform.audience.isAllCity = false);
            }
            let checkText = [];
            let CheckedNodes = this.$refs.citys.getCheckedNodes();
            CheckedNodes = CheckedNodes.filter(
                (option) => !(option.parent && option.parent.checked)
            );
            for (let i in CheckedNodes) {
                checkText.push({
                    label: CheckedNodes[i].label,
                    value: CheckedNodes[i].value,
                });
            }
            this.createform.audience.cityHasCheck = checkText;
            let childNodes = this.$refs.citys
                .getCheckedNodes(true)
                .map((it) => {
                    return it.value;
                });
            this.createform.audience.cityAllValue = childNodes;
            this.sessionSave();
        },
        // 城市删除
        deletCity(item, index) {
            let a = this.createform.audience.cityVal.filter((it) => {
                if (!it.includes(item.value)) {
                    return it;
                }
            });
            this.createform.audience.cityVal = a;
            this.createform.audience.cityHasCheck.splice(index, 1);
            this.createform.audience.isAllCity = false;
            this.$nextTick(() => {
                let childNodes = this.$refs.citys
                    .getCheckedNodes(true)
                    .map((it) => {
                        return it.value;
                    });
                this.createform.audience.cityAllValue = childNodes;
                this.sessionSave();
            });
            this.sessionSave();
        },
        // 清空已选
        clearCitySNode(refs) {
            this.createform.audience.cityVal = [];
            this.createform.audience.cityHasCheck = [];
            this.createform.audience.cityAllValue = [];
            this.createform.audience.isAllCity = false;
            this.$refs[refs].clearCheckedNodes();
            this.sessionSave();
        },
        //地域切换
        changeCity() {
            this.createform.audience.location_type = "CURRENT";
            this.createform.audience.cityVal = [];
            this.createform.audience.cityHasCheck = [];
            this.createform.audience.cityAllValue = [];
            this.createform.audience.isAllCity = false;
            if(this.createform.audience.location_type!=='CURRENT'){
                this.createform.audience.exclude_limited_region = 0
            }
            this.sessionSave();
        },

        //地域区域切换
        selectRegion(){
            if(this.createform.audience.location_type!=='CURRENT'){
                this.createform.audience.exclude_limited_region = 0
            }
            this.sessionSave();
        },

        // 已选抖音用户行为类型
        changeAwemeFan() {
            if (this.createform.audience.aweme_fan_behaviors.length == 0) {
                this.createform.audience.aweme_fan_behaviors = [
                    "FOLLOWED_USER",
                ];
            }
            if(this.createform.audience.aweme_fan_behaviors.length==1&&this.createform.audience.aweme_fan_behaviors[0]=='FOLLOWED_USER'){
                this.createform.audience.aweme_fan_behaviors_days = ''
            }else{
                this.createform.audience.aweme_fan_behaviors_days = 'DAYS_15'
            }
            this.getAwemecategory();
        },

        //获取抖音类目列表
        async getAwemecategory() {
            this.titok_loadding = true;
            const { data: res } = await this.$http.post(
                "launch/Getinfo/get_awemecategory",
                {
                    advertiser_id:
                        this.dataForm.tableData[0].hasAdver.advertiser_id,
                    behaviors: this.createform.audience.aweme_fan_behaviors,
                }
            );
            if (res.code !== 200) {
                this.$message.error(res.msg);
                this.titok_loadding = false;
                return;
            } else {
                this.titok_loadding = false;
                ++this.titokResh;
                this.createform.audience.tiktokTypeOption = this.getTreeData(
                    res.data
                );
            }
            this.sessionSave();
        },

        //获取推荐达人列表
        async getRecommendedTalent() {
            this.talent_loadding = true;
            const { data: res } = await this.$http.post(
                "launch/Getinfo/get_awemecategorytoauthor",
                {
                    advertiser_id:
                        this.dataForm.tableData[0].hasAdver.advertiser_id,
                    category_id: this.createform.audience.category_id,
                }
            );
            if (res.code !== 200) {
                this.talent_loadding = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.talent_loadding = false;
                this.createform.audience.titokTalentList = res.data;
            }
            this.sessionSave();
        },

        // 查看推荐抖音达人
        getRecomendList() {
            this.createform.audience.recomentRadio = "TITKOT";
            this.getRecommendedTalent();
        },

        // 选择抖音达人分类
        changeTitokTalent() {
            this.createform.audience.titokQuery = "";
            this.getRecommendedTalent();
        },

        //选择抖音达人子元素
        checkTitokChild(item) {
            for (let i in this.createform.audience.titokTalentVal) {
                if (
                    this.createform.audience.titokTalentVal[i] == item.label_id
                ) {
                    this.createform.audience.titokTalentText.push({
                        name: item.author_name,
                        id: item.label_id,
                        fans: item.total_fans_num_str,
                        cover: item.cover_num_str,
                    });
                }
            }
            this.sessionSave();
        },

        // 搜索抖音达人
        async remoteMethodTitok() {
            if (!this.createform.audience.titokQuery) {
                return;
            }
            this.createform.audience.recomentRadio = "TITKOT";
            this.talent_loadding = true;
            const { data: res } = await this.$http.post(
                "launch/Getinfo/aweme_info_search",
                {
                    query_word: this.createform.audience.titokQuery,
                    behaviors: this.createform.audience.aweme_fan_behaviors,
                }
            );
            if (res.code !== 200) {
                this.talent_loadding = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.talent_loadding = false;
                this.createform.audience.category_id = "";
                this.createform.audience.titokTalentList = res.data;
            }
            this.sessionSave();
        },

        //选择抖音达人列表
        checkTitokTalent() {
            let arr = [];
            for (let i in this.createform.audience.titokTalentVal) {
                for (let a in this.createform.audience.titokTalentText) {
                    if (
                        this.createform.audience.titokTalentVal[i] ==
                        this.createform.audience.titokTalentText[a].id
                    ) {
                        arr.push({
                            name: this.createform.audience.titokTalentText[a]
                                .name,
                            id: this.createform.audience.titokTalentText[a].id,
                            fans: this.createform.audience.titokTalentText[a]
                                .fans,
                            cover: this.createform.audience.titokTalentText[a]
                                .cover,
                        });
                    }
                }
            }
            this.createform.audience.titokTalentText = arr;
            this.createform.audience.tiktokAllCheck =
                this.createform.audience.tiktokTypeCheck.concat(
                    this.createform.audience.titokTalentText
                );
            this.sessionSave();
        },

        // 达人分类选择
        tiktokTypeCheck() {
            this.createform.audience.recomentRadio = "CLASS";
            this.$nextTick(() => {
                let CheckedNodes = this.$refs.tiktokType.getCheckedNodes();
                let checkText = [];
                CheckedNodes = CheckedNodes.filter(
                    (option) => !(option.parent && option.parent.checked)
                );
                for (let i in CheckedNodes) {
                    checkText.push({
                        name: CheckedNodes[i].data.value,
                        id: CheckedNodes[i].data.id,
                        fans: CheckedNodes[i].data.fans_num_str,
                        cover: CheckedNodes[i].data.cover_num_str,
                    });
                }
                this.createform.audience.tiktokTypeCheck = checkText;
                this.createform.audience.tiktokAllCheck =
                    this.createform.audience.tiktokTypeCheck.concat(
                        this.createform.audience.titokTalentText
                    );
                this.sessionSave();
            });
        },

        // 点击获取达人分类节点
        getTiktokData(node) {
            this.createform.audience.category_text = node.label;
            this.createform.audience.category_id = node.value;
            this.sessionSave();
        },
        // 抖音达人删除
        deletTiktokCheck(item, index) {
            let a = this.createform.audience.tiktokTypeVal.filter((it) => {
                if (!it.includes(item.id)) {
                    return it;
                }
            });
            let b = this.createform.audience.titokTalentVal.filter((it) => {
                if (it != item.id) {
                    return it;
                }
            });
            let c = this.createform.audience.tiktokTypeCheck.filter((it) => {
                if (it.id != item.id) {
                    return it;
                }
            });
            let d = this.createform.audience.titokTalentText.filter((it) => {
                if (it.id != item.id) {
                    return it;
                }
            });
            this.createform.audience.tiktokTypeVal = a;
            this.createform.audience.titokTalentVal = b;
            this.createform.audience.tiktokTypeCheck = c;
            this.createform.audience.titokTalentText = d;
            this.createform.audience.tiktokAllCheck.splice(index, 1);
            this.sessionSave();
        },
        // 清空已选
        clearTalentNode(refs) {
            this.createform.audience.tiktokTypeVal = [];
            this.createform.audience.titokTalentVal = [];
            this.createform.audience.tiktokTypeCheck = [];
            this.createform.audience.titokTalentText = [];
            this.createform.audience.tiktokAllCheck = [];
            this.sessionSave();
        },

        // 过滤空数组
        getTreeData(data) {
            if (!data || !data.length) return;
            for (var i = 0; i < data.length; i++) {
                if (data[i].children && data[i].children.length < 1) {
                    data[i].children = null;
                } else {
                    this.getTreeData(data[i].children);
                }
            }
            return data;
        },

        //获取平台精选人群包
        async getPlamCrow() {
            this.pt_loadding = true;
            const { data: res } = await this.$http.post(
                "launch/Getinfo/get_audienceslist",
                {
                    advertiser_id:
                        this.dataForm.tableData[0].hasAdver.advertiser_id,
                    type: 0,
                }
            );
            if (res.code !== 200) {
                this.pt_loadding = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.pt_loadding = false;
                this.createform.audience.plartformCrow =
                    res.data.retargeting_tags;
            }
            this.checkPlartCrowd(this.createform.audience.plartformVal);
            this.sessionSave();
        },

        //获取自定义人群包
        async getCustomCrow() {
            this.zdy_loadding = true;
            const { data: res } = await this.$http.post(
                "launch/Getinfo/get_audienceslist",
                {
                    advertiser_id:
                        this.dataForm.tableData[0].hasAdver.advertiser_id,
                    type: 1,
                }
            );
            if (res.code !== 200) {
                this.zdy_loadding = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.zdy_loadding = false;
                let newArr = [];
                for (let i in res.data.retargeting_tags) {
                    for (let a in this.createform.audience.customCrowdText) {
                        if (
                            res.data.retargeting_tags[i].retargeting_tags_id ==
                            this.createform.audience.customCrowdText[a]
                                .retargeting_tags_id
                        ) {
                            res.data.retargeting_tags[i].retargeting_tags_op =
                                this.createform.audience.customCrowdText[
                                    a
                                ].retargeting_tags_op;
                            newArr.push(
                                this.createform.audience.customCrowdText[a]
                            );
                        }
                    }
                }
                this.createform.audience.customCrowdText = newArr;
                this.checkPlartCrowd(this.createform.audience.plartformVal);
                this.createform.audience.customCrow = res.data.retargeting_tags;
            }
            this.sessionSave();
        },

        // 切换人群包
        changeCrowd() {
            this.crowdQuery = "";
            if (this.createform.audience.crowdRadio == 2) {
                this.getPlamCrow();
                this.getCustomCrow();
            }
            this.sessionSave();
        },

        //选择平台精选人群
        checkPlartCrowd(v) {
            let list = v;
            let list2 = this.createform.audience.plartformCrow;
            let newArr = list2.filter(function (n) {
                return list.indexOf(n.retargeting_tags_id + "") != -1;
            });
            this.createform.audience.plartformText = newArr;
            this.createform.audience.allCrowdCheck =
                this.createform.audience.plartformText.concat(
                    this.createform.audience.customCrowdText
                );
            this.sessionSave();
        },

        // 自定义人群包搜索
        filterCustomCrowd(list) {
            var list = list,
                query = this.crowdQuery;

            if (!query) {
                return list;
            }
            query = query.trim();

            list = list.filter(function (item) {
                if (item.name.indexOf(query) !== -1) {
                    return item;
                }
            });
            return list;
        },

        // 选择自定义人群包
        addCustomCrowd(type, index, item) {
            let flag = false;
            let on = null;
            let list = this.createform.audience.customCrowdText;
            // this.createform.audience.customCrow[index].retargeting_tags_op =
            //     type;
            item.retargeting_tags_op = type;
            for (let i in list) {
                if (list[i].retargeting_tags_id == item.retargeting_tags_id) {
                    flag = true;
                    on = i;
                    break;
                }
            }
            if (flag) {
                list[on] = item;
            } else {
                list.push(item);
            }
            this.createform.audience.allCrowdCheck =
                this.createform.audience.plartformText.concat(list);
            this.sessionSave();
        },

        // 切换抖音达人
        changeAudience() {
            if (this.createform.audience.awemeRadio == 2) {
                this.getAwemecategory();
            }
            this.sessionSave();
        },

        // 抖音达人删除
        deletCrowdCheck(item, index) {
            let b = this.createform.audience.plartformVal.filter((it) => {
                if (it != item.retargeting_tags_id) {
                    return it;
                }
            });
            let c = this.createform.audience.plartformText.filter((it) => {
                if (it.retargeting_tags_id != item.retargeting_tags_id) {
                    return it;
                }
            });
            let d = this.createform.audience.customCrowdText.filter((it) => {
                if (it.retargeting_tags_id != item.retargeting_tags_id) {
                    return it;
                }
            });
            let num = this.createform.audience.customCrow.findIndex(
                (val) => val.retargeting_tags_id == item.retargeting_tags_id
            );
            this.createform.audience.plartformVal = b;
            this.createform.audience.plartformText = c;
            this.createform.audience.customCrowdText = d;
            if (num != -1) {
                this.createform.audience.customCrow[num].retargeting_tags_op =
                    "ALL";
            }
            this.createform.audience.allCrowdCheck.splice(index, 1);
            this.sessionSave();
        },

        // 已选人群包筛选
        checkCrowdDrop(type) {
            this.createform.audience.crowdDrop = type;
        },

        // 已选人群包筛选
        filterAllCrowd(list, type) {
            var list = list,
                query = type;

            if (type == "ALL") {
                return list;
            }
            query = query.trim();

            list = list.filter(function (item) {
                if (item.retargeting_tags_op == query) {
                    return item;
                }
            });
            return list;
        },

        // 清空人群包
        clearCrowd() {
            this.createform.audience.plartformVal = [];
            this.createform.audience.plartformText = [];
            this.createform.audience.customCrowdText = [];
            this.createform.audience.allCrowdCheck = [];
            for (let i in this.createform.audience.customCrow) {
                this.createform.audience.customCrow[i].retargeting_tags_op =
                    "ALL";
            }
            this.sessionSave();
        },

        // 选择智能放量
        checkExtend(v) {
            let list = v;
            let list2 = this.extendList;
            let newArr = list2.filter(function (n) {
                return list.indexOf(n.id) != -1;
            });
            this.createform.audience.auto_extend_text = newArr;
            this.sessionSave();
        },

        // 删除智能放量
        deletExtend(item, index) {
            let b = this.createform.audience.auto_extend_targets.filter(
                (it) => {
                    if (it != item.id) {
                        return it;
                    }
                }
            );
            this.createform.audience.auto_extend_targets = b;
            this.createform.audience.auto_extend_text.splice(index, 1);
            this.sessionSave();
        },

        // 清空已选智能放量
        clearExtend() {
            this.createform.audience.auto_extend_targets = [];
            this.createform.audience.auto_extend_text = [];
            this.sessionSave();
        },

        // 切换行为兴趣意向
        swicthAction() {
            if (this.createform.audience.smart_interest_action == "CUSTOM") {
                this.getActionList();
                this.getInterestList();
            }
            this.sessionSave();
        },

        // 行为互动筛选
        changeAction() {
            if (this.createform.audience.action_scene.length == 0) {
                this.createform.audience.action_scene = [
                    "E-COMMERCE",
                    "NEWS",
                    "APP",
                ];
            }
            this.getActionList();
            this.getActionKey();
        },

        // 行为天数
        selectActionDay() {
            this.getActionList();
            this.getActionKey();
        },

        //获取行为类目词
        async getActionList() {
            this.als_loadding = true;
            const { data: res } = await this.$http.post(
                "launch/Getinfo/get_interest_action",
                {
                    advertiser_id:
                        this.dataForm.tableData[0].hasAdver.advertiser_id,
                    action_scene: this.createform.audience.action_scene,
                    action_days: this.createform.audience.action_days,
                }
            );
            if (res.code !== 200) {
                this.als_loadding = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.als_loadding = false;
                this.createform.audience.actionList = res.data;
            }
            this.sessionSave();
        },

        // 行为类目选择
        getActionVal() {
            this.createform.audience.actionTab = "1";
            this.$nextTick(() => {
                let CheckedNodes = this.$refs.actionRef.getCheckedNodes();
                let checkText = [];
                CheckedNodes = CheckedNodes.filter(
                    (option) => !(option.parent && option.parent.checked)
                );
                for (let i in CheckedNodes) {
                    checkText.push({
                        name: CheckedNodes[i].data.name,
                        id: CheckedNodes[i].data.id,
                        num: CheckedNodes[i].data.num,
                    });
                }
                this.createform.audience.action_text = checkText;
                this.createform.audience.actionAllCheck =
                    this.createform.audience.action_text.concat(
                        this.createform.audience.action_key_text
                    );
                this.sessionSave();
            });
        },

        //获取行为类关键词
        async getActionKey() {
            this.aky_loadding = true;
            const { data: res } = await this.$http.post(
                "launch/Getinfo/get_interest_keyword",
                {
                    advertiser_id:
                        this.dataForm.tableData[0].hasAdver.advertiser_id,
                    query_words: this.createform.audience.actionKeyText,
                    action_scene: this.createform.audience.action_scene,
                    action_days: this.createform.audience.action_days,
                }
            );
            if (res.code !== 200) {
                this.aky_loadding = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.aky_loadding = false;
                for (let i in this.createform.audience.action_key_text) {
                    for (let a in res.data) {
                        if (
                            this.createform.audience.action_key_text[i].id ==
                            res.data[a].id
                        ) {
                            res.data[a].check = true;
                        }
                    }
                }
                this.createform.audience.action_key_list = res.data;
            }
            this.sessionSave();
        },

        // 添加行为关键词
        addActionKey(item, index) {
            this.createform.audience.action_key_text.push(item);
            this.createform.audience.actionAllCheck =
                this.createform.audience.action_text.concat(
                    this.createform.audience.action_key_text
                );
            this.createform.audience.action_key_list[index].check = true;
            this.sessionSave();
        },

        // 获取行为节点
        getActionData(data) {
            this.createform.audience.actionKeyText = data.name;
            this.sessionSave();
        },

        // 查找更多关键词
        findMoreActionKey() {
            if (!this.createform.audience.actionKeyText) {
                return;
            }
            this.createform.audience.actionTab = "2";
            this.getActionKey();
        },

        // 查找关键词
        findActionKey(item) {
            this.createform.audience.actionTab = "2";
            this.createform.audience.actionKeyText = item.name;
            this.getActionKey();
        },

        // 行为类目删除
        deletAction(item, index) {
            let a = this.createform.audience.action_val.filter((it) => {
                if (!it.includes(item.id)) {
                    return it;
                }
            });
            let b = this.createform.audience.action_key_text.filter((it) => {
                if (it.id != item.id) {
                    return it;
                }
            });

            let c = this.createform.audience.action_text.filter((it) => {
                if (it.id != item.id) {
                    return it;
                }
            });

            let num = this.createform.audience.action_key_list.findIndex(
                (val) => val.id == item.id
            );
            if (num != -1) {
                this.createform.audience.action_key_list[num].check = false;
            }
            this.createform.audience.action_val = a;
            this.createform.audience.action_key_text = b;
            this.createform.audience.action_text = c;
            this.createform.audience.actionAllCheck.splice(index, 1);
            this.sessionSave();
        },

        // 清空行为关键词
        clearActionKey() {
            this.createform.audience.action_val = [];
            this.createform.audience.action_key_text = [];
            this.createform.audience.action_text = [];
            this.createform.audience.actionAllCheck = [];
            for (let i in this.createform.audience.action_key_list) {
                this.createform.audience.action_key_list[i].check = false;
            }
            this.sessionSave();
        },

        //获取兴趣类目
        async getInterestList() {
            this.ils_loadding = true;
            const { data: res } = await this.$http.post(
                "launch/Getinfo/get_interest_category",
                {
                    advertiser_id:
                        this.dataForm.tableData[0].hasAdver.advertiser_id,
                }
            );
            if (res.code !== 200) {
                this.ils_loadding = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.ils_loadding = false;
                this.createform.audience.interestList = res.data;
            }
            this.sessionSave();
        },

        // 兴趣类目选择
        getInterestVal() {
            this.createform.audience.interestTab = "1";
            this.$nextTick(() => {
                let CheckedNodes = this.$refs.interestRef.getCheckedNodes();
                let checkText = [];
                CheckedNodes = CheckedNodes.filter(
                    (option) => !(option.parent && option.parent.checked)
                );
                for (let i in CheckedNodes) {
                    checkText.push({
                        name: CheckedNodes[i].data.name,
                        id: CheckedNodes[i].data.id,
                        num: CheckedNodes[i].data.num,
                    });
                }
                this.createform.audience.interest_text = checkText;
                this.createform.audience.interestAllCheck =
                    this.createform.audience.interest_text.concat(
                        this.createform.audience.interest_key_text
                    );
                this.sessionSave();
            });
        },

        //获取兴趣关键词
        async getInterestKey() {
            this.iky_loadding = true;
            const { data: res } = await this.$http.post(
                "launch/Getinfo/get_category_keyword",
                {
                    advertiser_id:
                        this.dataForm.tableData[0].hasAdver.advertiser_id,
                    query_words: this.createform.audience.interestKeyText,
                }
            );
            if (res.code !== 200) {
                this.iky_loadding = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.iky_loadding = false;
                for (let i in this.createform.audience.interest_key_text) {
                    for (let a in res.data) {
                        if (
                            this.createform.audience.interest_key_text[i].id ==
                            res.data[a].id
                        ) {
                            res.data[a].check = true;
                        }
                    }
                }
                this.createform.audience.interest_key_list = res.data;
            }
            this.sessionSave();
        },

        // 添加行为关键词
        addInterestKey(item, index) {
            this.createform.audience.interest_key_text.push(item);
            this.createform.audience.interestAllCheck =
                this.createform.audience.interest_text.concat(
                    this.createform.audience.interest_key_text
                );
            this.createform.audience.interest_key_list[index].check = true;
            this.sessionSave();
        },

        // 获取行为节点
        getInterestData(data) {
            this.createform.audience.interestKeyText = data.name;
            this.sessionSave();
        },

        // 查找更多关键词
        findMoreInterestKey() {
            if (!this.createform.audience.interestKeyText) {
                return;
            }
            this.createform.audience.interestTab = "2";
            this.getInterestKey();
        },

        // 查找关键词
        findInterestKey(item) {
            this.createform.audience.interestTab = "2";
            this.createform.audience.interestKeyText = item.name;
            this.getInterestKey();
        },

        // 行为类目删除
        deletInterest(item, index) {
            let a = this.createform.audience.interest_val.filter((it) => {
                if (!it.includes(item.id)) {
                    return it;
                }
            });
            let b = this.createform.audience.interest_key_text.filter((it) => {
                if (it.id != item.id) {
                    return it;
                }
            });

            let c = this.createform.audience.interest_text.filter((it) => {
                if (it.id != item.id) {
                    return it;
                }
            });

            let num = this.createform.audience.interest_key_list.findIndex(
                (val) => val.id == item.id
            );
            if (num != -1) {
                this.createform.audience.interest_key_list[num].check = false;
            }
            this.createform.audience.interest_val = a;
            this.createform.audience.interest_key_text = b;
            this.createform.audience.interest_text = c;
            this.createform.audience.interestAllCheck.splice(index, 1);
            this.sessionSave();
        },

        // 清空行为关键词
        clearInterestKey() {
            this.createform.audience.interest_val = [];
            this.createform.audience.interest_key_text = [];
            this.createform.audience.interest_text = [];
            this.createform.audience.interestAllCheck = [];
            for (let i in this.createform.audience.interest_key_list) {
                this.createform.audience.interest_key_list[i].check = false;
            }
            this.sessionSave();
        },

        // 添加定向人群列表
        addAudience() {
            let that = this;
            let list = that.createform;
            if (list.audience_list.length > 9) {
                return;
            } else {
                this.ActionInterestCheck(list.audience_active, function () {
                    let audience = {
                        model_name:
                            "定向人群" + (list.audience_list.length + 1),
                        isAllCity: false, //城市是否全选
                        district: "NONE", //城市
                        location_type: "CURRENT",
                        cityVal: [], //已选城市
                        cityHasCheck: [],
                        cityAllValue: [], //地域提交值
                        gender: "NONE", //性别
                        age: [], //年龄
                        awemeRadio: "1", //抖音达人切换
                        recomentRadio: "CLASS", //抖音达人切换
                        aweme_fan_behaviors: ["FOLLOWED_USER"], //已选抖音用户行为类型
                        aweme_fan_behaviors_days: "", //抖音达人互动用户行为天数
                        category_id: "", //推荐达人ID
                        category_text: "", //推荐名称
                        titokQuery: "", //抖音达人搜索
                        tiktokTypeOption: [], //达人分类列表
                        tiktokTypeCheck: [], //已选达人分类
                        tiktokTypeVal: [], //已选达人分类绑定值
                        titokTalentList: [], //抖音达人列表
                        titokTalentVal: [], //抖音达人绑定值ID
                        titokTalentText: [], //抖音达人显示值
                        tiktokAllCheck: [], //抖音达人总选
                        back_id: "", //返回达人ID
                        back_text: "", //返回达人名称
                        crowdRadio: "1", //更多人群切换
                        crowdTab: "1",
                        crowdDrop: "ALL",
                        plartformCrow: [], //平台精选人群列表
                        customCrow: [], //自定义人群列表
                        plartformVal: [], //平台精选人群绑定值
                        plartformText: [], //已选平台精选人群
                        customCrowdText: [], //已选自定义人群
                        allCrowdCheck: [], //人群总选
                        auto_extend_enabled: 0, //是否开启智能投放
                        auto_extend_targets: [], //已选智能投放绑定值
                        auto_extend_text: [], //已选智能投放列表
                        smart_interest_action: "", //行为兴趣类型
                        action_scene: ["E-COMMERCE", "NEWS", "APP"], //行为场景
                        actionTab: "1",
                        interestTab: "1",
                        action_days: "30", //行为天数
                        actionList: [], //行为类目列表
                        action_val: [], //行为类目绑定值
                        action_text: [], //行为类目已选值
                        action_key_list: [], //行为类目关键词列表
                        action_key_text: [], //行为类目已选关键词
                        actionAllCheck: [], //行为类目词总选值
                        actionKeyText: "", //已选行为类目
                        interestList: [], //兴趣类目列表
                        interest_val: [], //兴趣类目绑定值
                        interest_text: [], //兴趣类目已选值
                        interest_key_list: [], //兴趣关键词列表
                        interest_key_text: [], //兴趣已选关键词
                        interestAllCheck: [], //兴趣总选值
                        interestKeyText: "", //已选兴趣类目
                        age_null: "1",
                        ac: [], //网络
                        ac_null: "1",
                        platform: "", //平台
                        audience_mode:'AUTO',
                        exclude_limited_region:0,//排除限定地区
                        new_customer:'NONE',//新客定向
                    };
                    list.audience_list.push(audience);
                    list.audience_active = list.audience_list.length - 1;
                    list.audience = list.audience_list[list.audience_active];
                });
            }
            this.sessionSave();
        },

        //删除定向人群列表
        deletAudience(index) {
            let list = this.createform;
            if (this.createform.audience_list.length == 1) {
                return;
            } else {
                list.audience_list.splice(index, 1);
                list.audience_active = 0;
                list.audience = list.audience_list[0];
            }
            this.sessionSave();
        },

        // 选择定向人群模板
        seletAudience(val, index) {
            let that = this;
            let list = that.createform;
            if (list.audience_list.length == 1) {
                list.audience_active = index;
                list.audience = val;
            } else {
                this.ActionInterestCheck(list.audience_active, function () {
                    list.audience_list[list.audience_active] = list.audience;
                    list.audience_active = index;
                    list.audience = val;
                    that.changePlanKey(4, val.model_name);
                });
            }
            this.sessionSave();
        },

        // 选择定向人群模板
        audienceModel() {
            const attr = {
                dialogVsb: true,
            };
            this.$bus.emit("audienceModel", attr);
        },

        // 选择创意形式
        changeCreativeWay() {
            this.createform.creative_material_mode = "CUSTOM_CREATIVE";
            this.createform.name = this.deletCreatIsCust();
            this.sessionSave();
        },

        // 选择创意形式
        changeCreativeWay2() {
            this.createform.name = this.deletCreatIsCust();
            this.sessionSave();
        },

        // 切换创意类型
        changeCreativeMode() {
            this.createform.name = this.deletCreatIsCust();
            this.sessionSave();
        },

        // 添加视频
        addMateri() {
            const attr = {
                dialogVsb: true,
                advertiser_id:
                    this.dataForm.tableData[0].hasAdver.advertiser_id,
                aweme_id:this.dataForm.tableData[0].hasAchor.aweme_id,
                product_id:this.dataForm.tableData[0].hasShop.product_id,
                is_qc: this.dataForm.tableData.length >= 2 ? true : false,
                length: this.createform.creatinfo.creative.length,
            };
            this.$bus.emit("addMateri", attr);
        },

        // 更换视频
        editMateri(index) {
            const attr = {
                dialogVsb: true,
                advertiser_id:
                    this.dataForm.tableData[0].hasAdver.advertiser_id,
                aweme_id:this.dataForm.tableData[0].hasAchor.aweme_id,
                product_id:this.dataForm.tableData[0].hasShop.product_id,
                is_qc: this.dataForm.tableData.length >= 2 ? true : false,
                index: index,
            };
            this.$bus.emit("editMateri", attr);
        },

        // 更换封面
        editPicture(index) {
            const attr = {
                dialogVsb: true,
                index: index,
            };
            this.$bus.emit("editPicture", attr);
        },

        // 删除视频
        deletMateri(index) {
            this.createform.creatinfo.creative.splice(index, 1);
            this.sessionSave();
        },

        // 添加图片
        addPicture() {
            const attr = {
                dialogVsb: true,
                length: this.createform.creatinfo.creative.length,
            };
            this.$bus.emit("addPicture", attr);
        },

        //获取动态创意词包
        async getKeyWord() {
            const { data: res } = await this.$http.post(
                "launch/Getinfo/get_creative_word",
                {
                    advertiser_id:
                        this.dataForm.tableData[0].hasAdver.advertiser_id,
                }
            );
            if (res.code !== 200) {
                this.$message.error(res.msg);
                return;
            } else {
                this.keyWordList = res.data;
                this.keyWordFour = res.data.slice(0, 4);
            }
        },

        // 添加创意词包-自定义
        addWrodKey(item, word, index) {
            if (item.dynamic_words.length >= 2) {
                this.$message.error("最多只能插入2个创意包");
                return;
            } else {
                let text = this.createform.creatinfo.creative[index].title;
                text =
                    this.createform.creatinfo.creative[index].title.slice(
                        0,
                        this.blurIndex
                    ) +
                    "{" +
                    word.name +
                    "}" +
                    this.createform.creatinfo.creative[index].title.slice(
                        this.blurIndex
                    );
                this.createform.creatinfo.creative[index].title = text;
                // this.createform.creatinfo.creative[index].title +=
                //     "{" + word.name + "}";
                this.createform.creatinfo.creative[index].dynamic_words.push({
                    word_id: word.creative_word_id,
                    dict_name: word.name,
                    default_word: word.default_word,
                });
            }
            this.sessionSave();
        },

        //创意词包验证-自定义
        changeWordInfo(val, index) {
            this.$nextTick(() => {
                let wordList = this.keyWordList;
                let arr = [];
                let arrAll = [];
                let ref2 = /\{(.+?)\}/g;
                let ref = /\{(.+?)\}/;
                let str = val.title.match(ref2);
                for (let i in str) {
                    let text = str[i].match(ref);
                    arrAll.push(text[1]);
                }
                for (let i in wordList) {
                    for (let a in arrAll) {
                        if (wordList[i].name == arrAll[a]) {
                            if (arr.length >= 2) {
                                return;
                            } else {
                                arr.push({
                                    word_id: wordList[i].creative_word_id,
                                    dict_name: wordList[i].name,
                                    default_word: wordList[i].default_word,
                                });
                            }
                        }
                    }
                }
                this.createform.creatinfo.creative[index].dynamic_words = arr;
                this.sessionSave();
            });
        },

        //创意词包验证-程序化
        changeWordTitle(val, index) {
            this.$nextTick(() => {
                let wordList = this.keyWordList;
                let arr = [];
                let arrAll = [];
                let ref2 = /\{(.+?)\}/g;
                let ref = /\{(.+?)\}/;
                let str = val.title.match(ref2);
                for (let i in str) {
                    let text = str[i].match(ref);
                    arrAll.push(text[1]);
                }
                for (let i in wordList) {
                    for (let a in arrAll) {
                        if (wordList[i].name == arrAll[a]) {
                            if (arr.length >= 2) {
                                return;
                            } else {
                                arr.push({
                                    word_id: wordList[i].creative_word_id,
                                    dict_name: wordList[i].name,
                                    default_word: wordList[i].default_word,
                                });
                            }
                        }
                    }
                }
                this.createform.creattitle.title[index].dynamic_words = arr;
                this.sessionSave();
            });
        },

        // 更多创意词包-自定义
        addMoreWord(item, index, type, text) {
            const attr = {
                dialogVsb: true,
                title: item.dynamic_words,
                index: index,
                type: type,
            };
            this.$bus.emit("addMoreWord", attr);
        },

        //清空创意词包-自定义
        clearWord(index) {
            // this.createform.creatinfo.creative[index].dynamic_words = [];
            this.sessionSave();
        },

        // 添加创意词包-程序化
        addWrodKeyCxh(item, word, index) {
            if (item.dynamic_words.length >= 2) {
                this.$message.error("最多只能插入2个创意包");
                return;
            } else {
                let text = this.createform.creattitle.title[index].title;
                // this.createform.creattitle.title[index].title +=
                //     "{" + word.name + "}";
                text =
                    this.createform.creattitle.title[index].title.slice(
                        0,
                        this.blurIndex
                    ) +
                    "{" +
                    word.name +
                    "}" +
                    this.createform.creattitle.title[index].title.slice(
                        this.blurIndex
                    );
                this.createform.creattitle.title[index].title = text;
                this.createform.creattitle.title[index].dynamic_words.push({
                    word_id: word.creative_word_id,
                    dict_name: word.name,
                    default_word: word.default_word,
                });
            }
            this.sessionSave();
        },

        // 获取光标位置
        blurEvent(e) {
            this.blurIndex = e.srcElement.selectionStart;
        },

        //清空创意词包-程序化
        clearWordCxh(index) {
            // this.createform.creattitle.title[index].dynamic_words = [];
            this.sessionSave();
        },

        // 秒数转换
        secondToTimeStr(t) {
            if (!t) return;
            if (t < 60) return "00:" + ((i = t) < 10 ? "0" + i : i);
            if (t < 3600)
                return (
                    "" +
                    ((a = parseInt(t / 60)) < 10 ? "0" + a : a) +
                    ":" +
                    ((i = t % 60) < 10 ? "0" + i : i)
                );
            if (3600 <= t) {
                var a,
                    i,
                    e = parseInt(t / 3600);
                return (
                    (e < 10 ? "0" + e : e) +
                    ":" +
                    ((a = parseInt((t % 3600) / 60)) < 10 ? "0" + a : a) +
                    ":" +
                    ((i = t % 60) < 10 ? "0" + i : i)
                );
            }
        },

        // 更改卡片信息
        editCardInfo(item, index, type) {
            const attr = {
                dialogVsb: true,
                card: item,
                index: index,
                type: type,
            };
            this.$bus.emit("editCardInfo", attr);
        },

        // 添加创意标题
        addCreatTitle() {
            this.createform.creattitle.title.push({
                title: "",
                dynamic_words: [],
            });
            this.sessionSave();
        },

        // 批量添加创意标题
        batchAddCreatTitle() {
            const attr = {
                dialogVsb: true,
            };
            this.$bus.emit("batchAddCreatTitle", attr);
        },

        // 删除创意标题
        deletCreatTitle(index) {
            if (this.createform.creattitle.title.length == 1) {
                return;
            } else {
                this.createform.creattitle.title.splice(index, 1);
            }
            this.sessionSave();
        },

        // 添加制作创意模板
        addCreatinfo() {
            let that = this;
            let list = that.createform;
            if (list.creatinfo_list.length > 9) {
                return;
            } else {
                this.creatCheck(list.creatinfo_active, function () {
                    let creatinfo = {
                        model_name: "创意组" + (list.creatinfo_list.length + 1),
                        creative: [],
                    };
                    list.creatinfo_list.push(creatinfo);
                    list.creatinfo_active = list.creatinfo_list.length - 1;
                    list.creatinfo = list.creatinfo_list[list.creatinfo_active];
                });
            }
            this.sessionSave();
        },

        // 选择制作创意模板
        seletCreatinfo(val, index) {
            let that = this;
            let list = that.createform;
            if (list.creatinfo_list.length == 1) {
                list.creatinfo_active = index;
                list.creatinfo = val;
            } else {
                this.creatCheck(list.creatinfo_active, function () {
                    list.creatinfo_list[list.creatinfo_active] = list.creatinfo;
                    list.creatinfo_active = index;
                    list.creatinfo = val;
                    that.changePlanKey(6, val.model_name);
                });
            }
            this.sessionSave();
        },

        //删除制作创意模板
        deletCreatinfo(index) {
            let list = this.createform;
            if (this.createform.creatinfo_list.length == 1) {
                return;
            } else {
                list.creatinfo_list.splice(index, 1);
                list.creatinfo_active = 0;
                list.creatinfo = list.creatinfo_list[0];
            }
            this.sessionSave();
        },

        // 添加创意标题模板
        addCreattitleModel() {
            let that = this;
            let list = that.createform;
            if (list.creattitle_list.length > 9) {
                return;
            } else {
                this.creattitleCheck(list.creattitle_active, function () {
                    let creattitle = {
                        model_name:
                            "标题组" + (list.creattitle_list.length + 1),
                        title: [
                            {
                                title: "",
                                dynamic_words: [],
                            },
                        ],
                    };
                    list.creattitle_list.push(creattitle);
                    list.creattitle_active = list.creattitle_list.length - 1;
                    list.creattitle =
                        list.creattitle_list[list.creattitle_active];
                });
            }
            this.sessionSave();
        },

        //删除制作创意模板
        deletCreattitleModel(index) {
            let list = this.createform;
            if (this.createform.creattitle_list.length == 1) {
                return;
            } else {
                list.creattitle_list.splice(index, 1);
                list.creattitle_active = 0;
                list.creattitle = list.creattitle_list[0];
            }
            this.sessionSave();
        },

        // 选择创意标题模板
        seletCreattitle(val, index) {
            let that = this;
            let list = that.createform;
            if (list.creattitle_list.length == 1) {
                list.creattitle_active = index;
                list.creattitle = val;
            } else {
                this.creattitleCheck(list.creattitle_active, function () {
                    list.creattitle_list[list.creattitle_active] =
                        list.creattitle;
                    list.creattitle_active = index;
                    list.creattitle = val;
                    that.changePlanKey(7, val.model_name);
                });
            }
            this.sessionSave();
        },

        // 添加创意标题模板
        creattitleModel() {
            const attr = {
                dialogVsb: true,
            };
            this.$bus.emit("creattitleModel", attr);
        },

        // 批量添加创意标题
        batchAddTitle(type) {
            const attr = {
                dialogVsb: true,
                type: type,
            };
            this.$bus.emit("batchAddTitle", attr);
        },

        //获取行业列表
        async getIndustryList() {
            const { data: res } = await this.$http.post(
                "launch/Getinfo/industry_list"
            );
            if (res.code !== 200) {
                this.$message.error(res.msg);
                return;
            } else {
                this.industryList = this.treeData(res.data);
            }
        },
        // 创意分类树形结构
        treeData(arr) {
            let first = [];
            arr.forEach((item) => {
                if (item.level == 1) {
                    first.push(item);
                }
            });
            first.forEach((item) => {
                item.children = [];
                arr.forEach((i) => {
                    if (
                        item.first_industry_id == i.first_industry_id &&
                        i.level == 2
                    ) {
                        item.children.push(i);
                    }
                });
            });
            first.forEach((item) => {
                item.children.forEach((i) => {
                    i.children = [];
                    arr.forEach((a) => {
                        if (
                            i.second_industry_id == a.second_industry_id &&
                            a.level == 3
                        ) {
                            i.children.push(a);
                        }
                    });
                });
            });
            return first;
        },

        // 关键词搜索
        async hotWrodSearch() {
            this.hotWrod_loadding = true;
            const { data: res } = await this.$http.post(
                "launch/Getinfo/hot_words",
                {
                    word: this.hotWrodQuery,
                }
            );
            if (res.code !== 200) {
                this.hotWrod_loadding = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.hotWrod_loadding = false;
                this.hotWordList = res.data;
            }
        },

        // 添加热词
        addHotWord(item) {
            if (this.createform.industryClass.ad_keywords.length >= 20) {
                return;
            } else {
                this.createform.industryClass.ad_keywords.push(item.word);
            }
            this.createform.industryClass.ad_keywords = [
                ...new Set(this.createform.industryClass.ad_keywords),
            ];
            this.sessionSave();
        },

        // 添加创意标签
        addIndustryTitle() {
            if (!this.industryName.trim()) {
                return;
            } else if (this.createform.industryClass.ad_keywords.length >= 20) {
                return;
            } else {
                this.createform.industryClass.ad_keywords.push(
                    this.industryName
                );
                this.industryName = "";
            }
            this.createform.industryClass.ad_keywords = [
                ...new Set(this.createform.industryClass.ad_keywords),
            ];
            this.sessionSave();
        },

        // 批量添加创意标签
        batchAddIndustry() {
            const attr = {
                dialogVsb: true,
            };
            this.$bus.emit("batchAddIndustry", attr);
        },

        // 删除创意标签
        deletIndustryTitle(index) {
            this.createform.industryClass.ad_keywords.splice(index, 1);
            this.sessionSave();
        },

        //清空创意标签
        clearIndustry() {
            this.createform.industryClass.ad_keywords = [];
            this.sessionSave();
        },

        //创意分类下拉
        seletCreatClass(v) {
            this.createform.industryClass.first_industry_id = v[0];
            this.createform.industryClass.second_industry_id = v[1];
            this.createform.industryClass.third_industry_id = v[2];
            this.sessionSave();
        },

        // 添加创意分类
        addIndustryClass() {
            let that = this;
            let list = that.createform;
            this.isHotWordShow = false;
            if (list.industry_list.length > 9) {
                return;
            } else {
                this.industryCheck(list.industry_active, function () {
                    let industry = {
                        model_name:
                            "创意分类" + (list.industry_list.length + 1),
                        industryValue: [],
                        ad_keywords: [],
                        first_industry_id: "",
                        second_industry_id: "",
                        third_industry_id: "",
                    };
                    list.industry_list.push(industry);
                    list.industry_active = list.industry_list.length - 1;
                    list.industryClass =
                        list.industry_list[list.industry_active];
                });
            }
            this.sessionSave();
        },

        //删除创意分类
        deletIndustryClass(index) {
            let list = this.createform;
            this.isHotWordShow = false;
            if (this.createform.industry_list.length == 1) {
                return;
            } else {
                list.industry_list.splice(index, 1);
                list.industry_active = 0;
                list.industry_list[0].industryValue =
                    list.industry_list[0].industryValue.map(Number);
                list.industryClass = list.industry_list[0];
            }
            this.sessionSave();
        },

        // 选择创意分类模板
        seletIndustry(val, index) {
            let that = this;
            let list = that.createform;
            this.isHotWordShow = false;
            if (list.industry_list.length == 1) {
                list.industry_active = index;
                list.industryClass = val;
            } else {
                this.industryCheck(list.industry_active, function () {
                    list.industry_list[list.industry_active] =
                        list.industryClass;
                    list.industry_active = index;
                    val.industryValue = val.industryValue.map(Number);
                    list.industryClass = val;
                    that.changePlanKey(5, val.model_name);
                });
            }
            this.sessionSave();
        },

        // 添加创意分类模板
        industryModel() {
            const attr = {
                dialogVsb: true,
            };
            this.$bus.emit("industryModel", attr);
        },

        // 添加计划名称词包
        addPlanKeyWord(item) {
            this.createform.name += item.key + "_";
            this.sessionSave();
        },

        // 计划名称状态
        getPlanNameStatus(item) {
            let name = this.createform.name;
            let ref2 = /\{(.+?)\}/g;
            let str = name.match(ref2);
            let is_true = false;
            for (let i in str) {
                if (str[i] == item.key) {
                    is_true = true;
                    break;
                }
            }
            return is_true;
        },

        //计划名称示例
        getPlanNameExple() {
            let name = this.createform.name;
            for (let i in this.planKeyWord) {
                name = name.replace(
                    this.planKeyWord[i].key,
                    this.planKeyWord[i].default_name
                );
            }
            return name;
        },

        // 双向绑定改变计划名
        changePlanKey(index, name) {
            this.planKeyWord[index].default_name = name;
            this.sessionSave();
        },

        // 获取当前时间
        getCurrentDate() {
            let nowData = new Date();
            let year = nowData.getFullYear();
            let month =
                nowData.getMonth() + 1 < 10
                    ? "0" + (nowData.getMonth() + 1)
                    : nowData.getMonth() + 1;
            let date =
                nowData.getDate() < 10
                    ? "0" + nowData.getDate()
                    : nowData.getDate();
            let hh = nowData.getHours();
            let mm =
                nowData.getMinutes() < 10
                    ? "0" + nowData.getMinutes()
                    : nowData.getMinutes();
            let ss =
                nowData.getSeconds() < 10
                    ? "0" + nowData.getSeconds()
                    : nowData.getSeconds();
            let getData =
                year +
                "-" +
                month +
                "-" +
                date +
                "/" +
                hh +
                ":" +
                mm +
                ":" +
                ss;
            return getData;
        },

        getExternalText() {
            let text = "";
            let value = this.dataForm.createform.external_action;
            if (value == "AD_CONVERT_TYPE_SHOPPING") {
                text = "商品购买";
            } else if (value == "AD_CONVERT_TYPE_QC_FOLLOW_ACTION") {
                text = "粉丝提升";
            } else if (value == "AD_CONVERT_TYPE_QC_MUST_BUY") {
                text = "点赞评论";
            } else if (value == "AD_CONVERT_TYPE_LIVE_ENTER_ACTION") {
                text = "进入直播间";
            } else if (value == "AD_CONVERT_TYPE_LIVE_CLICK_PRODUCT_ACTION") {
                text = "直播间商品点击";
            } else if (value == "AD_CONVERT_TYPE_LIVE_SUCCESSORDER_ACTION") {
                text = "直播间下单";
            } else if (value == "AD_CONVERT_TYPE_LIVE_SUCCESSORDER_PAY") {
                text = "直播间成交";
            } else if (value == "AD_CONVERT_TYPE_NEW_FOLLOW_ACTION") {
                text = "直播间粉丝提升";
            } else if (value == "AD_CONVERT_TYPE_LIVE_COMMENT_ACTION") {
                text = "直播间评论";
            }
            return text;
        },

        //自定义下隐藏标题组名称
        hideCreatTitle(item) {
            let is_show = null;
            if (
                item.name == "标题组包名" &&
                this.createform.creative_material_mode == "CUSTOM_CREATIVE"
            ) {
                is_show = false;
            } else {
                is_show = true;
            }
            return is_show;
        },

        //删除自定义下对应的标题名称
        deletCreatIsCust() {
            let name = this.createform.name;
            if (this.createform.creative_material_mode == "CUSTOM_CREATIVE") {
                name = name.replace("{标题组包名}", "");
            }
            return name;
        },

        // 提交添加
        submitForm(formName) {
            this.$refs[formName].validate(async (valid) => {
                if (valid) {
                    this.createform.exp_name = this.getPlanNameExple();
                    this.dataForm.step = 4;
                    window.sessionStorage.setItem(
                        "dataForm",
                        JSON.stringify(this.dataForm)
                    );
                } else {
                    this.loading = false;
                    this.$message.error("请完善信息！");
                    return false;
                }
            });
        },

        sessionSave() {
            window.sessionStorage.setItem(
                "dataForm",
                JSON.stringify(this.dataForm)
            );
        },

        // 上一步
        preStep() {
            this.dataForm.step = 2;
            this.sessionSave();
        },

        // 跳转到第一步
        toStepOne() {
            this.dataForm.step = 1;
            this.sessionSave();
        },

        // 取消创建
        cancelCreation() {
            this.$confirm("是否取消？", "提示", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            })
                .then(() => {
                    sessionStorage.removeItem("dataForm");
                    this.$parent.dataForm = JSON.parse(
                        JSON.stringify(this.$parent.resetForm)
                    );
                })
                .catch(() => {});
        },
    },
    components: {
        BudgetModel,
        AddBulkBid,
        AudienceModel,
        TimeSlot,
        SaveModelName,
        AddMateri,
        EditMateri,
        AddPicture,
        EditPicture,
        EditCardInfo,
        AddMoreWord,
        BatchAddIndustry,
        IndustryModel,
        CreatTitleModel,
        BatchAddCreatTitle,
        BatchAddTitle,
    },
};
</script>


<style scoped>
.create_footer {
    padding: 20px;
    text-align: right;
    box-shadow: 0px -2px 11px rgba(213, 210, 210, 0.23);
}
.market_title {
    font-size: 16px;
    color: #17233d;
    font-weight: bold;
    padding-left: 12px;
    position: relative;
    line-height: 22px;
    margin-bottom: 20px;
}
.market_title::after {
    content: "";
    position: absolute;
    height: 12px;
    width: 4px;
    background-color: #4475ff;
    border-radius: 5px;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}
.mt_12 {
    margin-top: 12px;
}
.active {
    font-weight: bold;
}
.plan_header {
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 999;
}
.no_radius {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding-top: 0;
}
.user_tips {
    line-height: 25px;
    padding: 0 12px;
    background-color: rgba(165, 177, 209, 0.08);
    margin-left: 8px;
}
</style>
